QuotaCounts deltas = computeQuotaDeltas(fsd, trgInode, srcList); verifyQuota(fsd, targetIIP, deltas);
checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot concat " + target); stat = FSDirConcatOp.concat(dir, pc, target, srcs, logRetryCache); success = true; } catch (AccessControlException ace) {
static FileStatus concat(FSDirectory fsd, FSPermissionChecker pc, String target, String[] srcs, boolean logRetryCache) throws IOException { validatePath(target, srcs); assert srcs != null; if (FSDirectory.LOG.isDebugEnabled()) { FSDirectory.LOG.debug("concat {} to {}", Arrays.toString(srcs), target); } final INodesInPath targetIIP = fsd.resolvePath(pc, target, DirOp.WRITE); // write permission for the target if (fsd.isPermissionEnabled()) { fsd.checkPathAccess(pc, targetIIP, FsAction.WRITE); } // check the target verifyTargetFile(fsd, target, targetIIP); // check the srcs INodeFile[] srcFiles = verifySrcFiles(fsd, srcs, targetIIP, pc); if(NameNode.stateChangeLog.isDebugEnabled()) { NameNode.stateChangeLog.debug("DIR* NameSystem.concat: " + Arrays.toString(srcs) + " to " + target); } long timestamp = now(); fsd.writeLock(); try { unprotectedConcat(fsd, targetIIP, srcFiles, timestamp); } finally { fsd.writeUnlock(); } fsd.getEditLog().logConcat(target, srcs, timestamp, logRetryCache); return fsd.getAuditFileInfo(targetIIP); }
verifyTargetFile(fsd, target, targetIIP); INodeFile[] srcFiles = verifySrcFiles(fsd, srcs, targetIIP, pc); fsd.writeLock(); try { unprotectedConcat(fsd, targetIIP, srcFiles, timestamp); } finally { fsd.writeUnlock();
srcFiles[i] = srcIIP.getLastINode().asFile(); FSDirConcatOp.unprotectedConcat(fsDir, targetIIP, srcFiles, concatDeleteOp.timestamp);
verifyTargetFile(fsd, target, targetIIP); INodeFile[] srcFiles = verifySrcFiles(fsd, srcs, targetIIP, pc); fsd.writeLock(); try { unprotectedConcat(fsd, targetIIP, srcFiles, timestamp); } finally { fsd.writeUnlock();
srcFiles[i] = srcIIP.getLastINode().asFile(); FSDirConcatOp.unprotectedConcat(fsDir, targetIIP, srcFiles, concatDeleteOp.timestamp);
QuotaCounts deltas = computeQuotaDeltas(fsd, trgInode, srcList); verifyQuota(fsd, targetIIP, deltas);
checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot concat " + target); stat = FSDirConcatOp.concat(dir, target, srcs, logRetryCache); success = true; } finally {
srcFiles[i] = srcIIP.getLastINode().asFile(); FSDirConcatOp.unprotectedConcat(fsDir, targetIIP, srcFiles, concatDeleteOp.timestamp);
QuotaCounts deltas = computeQuotaDeltas(fsd, trgInode, srcList); verifyQuota(fsd, targetIIP, deltas);
checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot concat " + target); stat = FSDirConcatOp.concat(dir, target, srcs, logRetryCache); success = true; } finally {