Skip to content

Commit

Permalink
Have the complete file rpc return the total file length.
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinjia committed May 16, 2016
1 parent a6f9246 commit 31df934
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 32 deletions.
Expand Up @@ -181,16 +181,16 @@ public Void call() throws AlluxioTException, TException {
*
* @param tempUfsFileId the worker specific id of the file to complete
* @param options method options
* @return the file size of the completed file
* @throws AlluxioException if an error occurs in the internals of the Alluxio worker
* @throws IOException if an error occurs interacting with the UFS
*/
public synchronized void completeUfsFile(final long tempUfsFileId,
public synchronized long completeUfsFile(final long tempUfsFileId,
final CompleteUfsFileOptions options) throws AlluxioException, IOException {
retryRPC(new RpcCallableThrowsAlluxioTException<Void>() {
return retryRPC(new RpcCallableThrowsAlluxioTException<Long>() {
@Override
public Void call() throws AlluxioTException, TException {
mClient.completeUfsFile(mSessionId, tempUfsFileId, options.toThrift());
return null;
public Long call() throws AlluxioTException, TException {
return mClient.completeUfsFile(mSessionId, tempUfsFileId, options.toThrift());
}
});
}
Expand Down

0 comments on commit 31df934

Please sign in to comment.