Toggle navigation
Home
int to alluxio.thrift.GetSizeTResponse
No. of Instances - 9
No. of Commits - 1
No. of Projects - {'alluxio'}
Hierarchy/Composition: Composition
Primitive Info: -
NameSpace: Jdk -> Internal
Mapping:
Cascading Type Change (Different)
RpcCallableThrowsIOException<Integer>
to
RpcCallableThrowsIOException<GetSizeTResponse>
Update Anonymous class
{ @Override public Integer call() throws AlluxioException, IOException { final long sessionId=Sessions.KEYVALUE_SESSION_ID; final long lockId=mBlockWorker.lockBlock(sessionId,blockId); try { return getReader(sessionId,lockId,blockId).size(); } catch ( InvalidWorkerStateException e) { LOG.error("Reaching invalid state to get size",e); } finally { mBlockWorker.unlockBlock(lockId); } return 0; } }
to
{ @Override public GetSizeTResponse call() throws AlluxioException, IOException { final long sessionId=Sessions.KEYVALUE_SESSION_ID; final long lockId=mBlockWorker.lockBlock(sessionId,blockId); try { return new GetSizeTResponse(getReader(sessionId,lockId,blockId).size()); } catch ( InvalidWorkerStateException e) { LOG.error("Reaching invalid state to get size",e); } finally { mBlockWorker.unlockBlock(lockId); } return new GetSizeTResponse(0); } }