tachyon
Class WorkerServiceHandler

java.lang.Object
  extended by tachyon.WorkerServiceHandler
All Implemented Interfaces:
WorkerService.Iface

public class WorkerServiceHandler
extends Object
implements WorkerService.Iface

WorkerServiceHandler handles all the RPC call to the worker.


Field Summary
 BlockingQueue<Integer> sDataAccessQueue
           
 
Constructor Summary
WorkerServiceHandler(InetSocketAddress masterAddress, InetSocketAddress workerAddress, String dataFolder, long spaceLimitBytes)
           
 
Method Summary
 void accessFile(int fileId)
           
 void addCheckpoint(long userId, int fileId)
           
 void cacheFile(long userId, int fileId)
           
 void checkStatus()
           
 String getDataFolder()
           
 String getUserTempFolder(long userId)
           
 String getUserUnderfsTempFolder(long userId)
           
 Command heartbeat()
           
 void lockFile(int fileId, long userId)
           
 void register()
           
 boolean requestSpace(long userId, long requestBytes)
           
 void resetMasterClient()
           
 void returnSpace(long userId, long returnedBytes)
           
 void unlockFile(int fileId, long userId)
           
 void userHeartbeat(long userId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sDataAccessQueue

public final BlockingQueue<Integer> sDataAccessQueue
Constructor Detail

WorkerServiceHandler

public WorkerServiceHandler(InetSocketAddress masterAddress,
                            InetSocketAddress workerAddress,
                            String dataFolder,
                            long spaceLimitBytes)
Method Detail

accessFile

public void accessFile(int fileId)
                throws org.apache.thrift.TException
Specified by:
accessFile in interface WorkerService.Iface
Throws:
org.apache.thrift.TException

addCheckpoint

public void addCheckpoint(long userId,
                          int fileId)
                   throws FileDoesNotExistException,
                          SuspectedFileSizeException,
                          FailedToCheckpointException,
                          org.apache.thrift.TException
Specified by:
addCheckpoint in interface WorkerService.Iface
Throws:
FileDoesNotExistException
SuspectedFileSizeException
FailedToCheckpointException
org.apache.thrift.TException

cacheFile

public void cacheFile(long userId,
                      int fileId)
               throws FileDoesNotExistException,
                      SuspectedFileSizeException,
                      org.apache.thrift.TException
Specified by:
cacheFile in interface WorkerService.Iface
Throws:
FileDoesNotExistException
SuspectedFileSizeException
org.apache.thrift.TException

checkStatus

public void checkStatus()

getDataFolder

public String getDataFolder()
                     throws org.apache.thrift.TException
Specified by:
getDataFolder in interface WorkerService.Iface
Throws:
org.apache.thrift.TException

getUserTempFolder

public String getUserTempFolder(long userId)
                         throws org.apache.thrift.TException
Specified by:
getUserTempFolder in interface WorkerService.Iface
Throws:
org.apache.thrift.TException

getUserUnderfsTempFolder

public String getUserUnderfsTempFolder(long userId)
                                throws org.apache.thrift.TException
Specified by:
getUserUnderfsTempFolder in interface WorkerService.Iface
Throws:
org.apache.thrift.TException

heartbeat

public Command heartbeat()
                  throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException

lockFile

public void lockFile(int fileId,
                     long userId)
              throws org.apache.thrift.TException
Specified by:
lockFile in interface WorkerService.Iface
Throws:
org.apache.thrift.TException

register

public void register()

returnSpace

public void returnSpace(long userId,
                        long returnedBytes)
                 throws org.apache.thrift.TException
Specified by:
returnSpace in interface WorkerService.Iface
Throws:
org.apache.thrift.TException

requestSpace

public boolean requestSpace(long userId,
                            long requestBytes)
                     throws org.apache.thrift.TException
Specified by:
requestSpace in interface WorkerService.Iface
Throws:
org.apache.thrift.TException

resetMasterClient

public void resetMasterClient()

unlockFile

public void unlockFile(int fileId,
                       long userId)
                throws org.apache.thrift.TException
Specified by:
unlockFile in interface WorkerService.Iface
Throws:
org.apache.thrift.TException

userHeartbeat

public void userHeartbeat(long userId)
                   throws org.apache.thrift.TException
Specified by:
userHeartbeat in interface WorkerService.Iface
Throws:
org.apache.thrift.TException


Copyright © 2013. All Rights Reserved.