void addCachePool(CachePoolInfo req, boolean logRetryCache) throws IOException { final String operationName = "addCachePool"; checkOperation(OperationCategory.WRITE); writeLock(); boolean success = false; String poolInfoStr = null; try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot add cache pool" + (req == null ? null : req.getPoolName())); CachePoolInfo info = FSNDNCacheOp.addCachePool(this, cacheManager, req, logRetryCache); poolInfoStr = info.toString(); success = true; } catch (AccessControlException ace) { logAuditEvent(success, operationName, poolInfoStr, null, null); throw ace; } finally { writeUnlock(operationName); } logAuditEvent(success, operationName, poolInfoStr, null, null); getEditLog().logSync(); }
void addCachePool(CachePoolInfo req, boolean logRetryCache) throws IOException { final String operationName = "addCachePool"; writeLock(); boolean success = false; String poolInfoStr = null; try { checkOperation(OperationCategory.WRITE); if (isInSafeMode()) { throw new SafeModeException( "Cannot add cache pool " + req.getPoolName(), safeMode); } CachePoolInfo info = FSNDNCacheOp.addCachePool(this, cacheManager, req, logRetryCache); poolInfoStr = info.toString(); success = true; } finally { writeUnlock(operationName); logAuditEvent(success, operationName, poolInfoStr, null, null); } getEditLog().logSync(); }
void addCachePool(CachePoolInfo req, boolean logRetryCache) throws IOException { final String operationName = "addCachePool"; writeLock(); boolean success = false; String poolInfoStr = null; try { checkOperation(OperationCategory.WRITE); if (isInSafeMode()) { throw new SafeModeException( "Cannot add cache pool " + req.getPoolName(), safeMode); } CachePoolInfo info = FSNDNCacheOp.addCachePool(this, cacheManager, req, logRetryCache); poolInfoStr = info.toString(); success = true; } finally { writeUnlock(operationName); logAuditEvent(success, operationName, poolInfoStr, null, null); } getEditLog().logSync(); }