use of org.apache.hadoop.ipc.RetryCache.CacheEntry in project hadoop by apache.
the class NameNodeRpcServer method modifyCachePool.
// ClientProtocol
@Override
public void modifyCachePool(CachePoolInfo info) throws IOException {
checkNNStartup();
namesystem.checkOperation(OperationCategory.WRITE);
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
if (cacheEntry != null && cacheEntry.isSuccess()) {
// Return previous response
return;
}
boolean success = false;
try {
namesystem.modifyCachePool(info, cacheEntry != null);
success = true;
} finally {
RetryCache.setState(cacheEntry, success);
}
}
use of org.apache.hadoop.ipc.RetryCache.CacheEntry in project hadoop by apache.
the class NameNodeRpcServer method endCheckpoint.
// NamenodeProtocol
@Override
public void endCheckpoint(NamenodeRegistration registration, CheckpointSignature sig) throws IOException {
checkNNStartup();
namesystem.checkSuperuserPrivilege();
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
if (cacheEntry != null && cacheEntry.isSuccess()) {
// Return previous response
return;
}
boolean success = false;
try {
namesystem.endCheckpoint(registration, sig);
success = true;
} finally {
RetryCache.setState(cacheEntry, success);
}
}
Aggregations