void removeCachePool(String cachePoolName, boolean logRetryCache) throws IOException { final String operationName = "removeCachePool"; checkOperation(OperationCategory.WRITE); writeLock(); boolean success = false; String poolNameStr = "{poolName: " + cachePoolName + "}"; try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot modify cache pool" + cachePoolName); FSNDNCacheOp.removeCachePool(this, cacheManager, cachePoolName, logRetryCache); success = true; } catch (AccessControlException ace) { logAuditEvent(success, operationName, poolNameStr, null, null); throw ace; } finally { writeUnlock(operationName); } logAuditEvent(success, operationName, poolNameStr, null, null); getEditLog().logSync(); }
void removeCachePool(String cachePoolName, boolean logRetryCache) throws IOException { final String operationName = "removeCachePool"; writeLock(); boolean success = false; try { checkOperation(OperationCategory.WRITE); if (isInSafeMode()) { throw new SafeModeException( "Cannot remove cache pool " + cachePoolName, safeMode); } FSNDNCacheOp.removeCachePool(this, cacheManager, cachePoolName, logRetryCache); success = true; } finally { writeUnlock(operationName); String poolNameStr = "{poolName: " + cachePoolName + "}"; logAuditEvent(success, operationName, poolNameStr, null, null); } getEditLog().logSync(); }
void removeCachePool(String cachePoolName, boolean logRetryCache) throws IOException { final String operationName = "removeCachePool"; writeLock(); boolean success = false; try { checkOperation(OperationCategory.WRITE); if (isInSafeMode()) { throw new SafeModeException( "Cannot remove cache pool " + cachePoolName, safeMode); } FSNDNCacheOp.removeCachePool(this, cacheManager, cachePoolName, logRetryCache); success = true; } finally { writeUnlock(operationName); String poolNameStr = "{poolName: " + cachePoolName + "}"; logAuditEvent(success, operationName, poolNameStr, null, null); } getEditLog().logSync(); }