/** Allow snapshot on a directory. */ void allowSnapshot(String path) throws IOException { checkOperation(OperationCategory.WRITE); final String operationName = "allowSnapshot"; boolean success = false; checkSuperuserPrivilege(operationName); writeLock(); try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot allow snapshot for " + path); FSDirSnapshotOp.allowSnapshot(dir, snapshotManager, path); success = true; } finally { writeUnlock(operationName); } getEditLog().logSync(); logAuditEvent(success, operationName, path, null, null); }
/** Allow snapshot on a directory. */ void allowSnapshot(String path) throws IOException { checkOperation(OperationCategory.WRITE); final String operationName = "allowSnapshot"; boolean success = false; writeLock(); try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot allow snapshot for " + path); checkSuperuserPrivilege(); FSDirSnapshotOp.allowSnapshot(dir, snapshotManager, path); success = true; } finally { writeUnlock(operationName); } getEditLog().logSync(); logAuditEvent(success, operationName, path, null, null); }
/** Allow snapshot on a directory. */ void allowSnapshot(String path) throws IOException { checkOperation(OperationCategory.WRITE); final String operationName = "allowSnapshot"; boolean success = false; writeLock(); try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot allow snapshot for " + path); checkSuperuserPrivilege(); FSDirSnapshotOp.allowSnapshot(dir, snapshotManager, path); success = true; } finally { writeUnlock(operationName); } getEditLog().logSync(); logAuditEvent(success, operationName, path, null, null); }