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