public class MasterServiceHandler extends Object implements MasterService.Iface
| Constructor and Description |
|---|
MasterServiceHandler(MasterInfo masterInfo) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCheckpoint(long workerId,
int fileId,
long fileSizeBytes,
String checkpointPath) |
ClientFileInfo |
getFileStatus(int fileId,
String path) |
List<ClientWorkerInfo> |
getWorkersInfo() |
List<ClientFileInfo> |
liststatus(String path) |
void |
user_completeFile(int fileId) |
int |
user_createDependency(List<String> parents,
List<String> children,
String commandPrefix,
List<ByteBuffer> data,
String comment,
String framework,
String frameworkVersion,
int dependencyType,
long childrenBlockSizeByte) |
int |
user_createFile(String path,
String ufsPath,
long blockSizeByte,
boolean recursive) |
long |
user_createNewBlock(int fileId) |
int |
user_createRawTable(String path,
int columns,
ByteBuffer metadata) |
boolean |
user_delete(int fileId,
String path,
boolean recursive)
Delete file
|
boolean |
user_freepath(int fileId,
String path,
boolean recursive) |
long |
user_getBlockId(int fileId,
int index) |
ClientBlockInfo |
user_getClientBlockInfo(long blockId)
Get block's ClientBlockInfo.
|
ClientDependencyInfo |
user_getClientDependencyInfo(int dependencyId) |
ClientRawTableInfo |
user_getClientRawTableInfo(int id,
String path)
Get RawTable's info; Return a ClientRawTable instance with id 0 if the system does not contain
the table.
|
List<ClientBlockInfo> |
user_getFileBlocks(int fileId,
String path)
Get file blocks info.
|
int |
user_getRawTableId(String path)
Return 0 if does not contain the Table, return fileId if it exists.
|
String |
user_getUfsAddress() |
long |
user_getUserId() |
NetAddress |
user_getWorker(boolean random,
String host)
Get local worker NetAddress
|
void |
user_heartbeat()
Returns if the message was received.
|
boolean |
user_mkdirs(String path,
boolean recursive) |
boolean |
user_rename(int fileId,
String srcPath,
String dstPath) |
void |
user_reportLostFile(int fileId) |
void |
user_requestFilesInDependency(int depId) |
void |
user_setPinned(int fileId,
boolean pinned) |
void |
user_updateRawTableMetadata(int tableId,
ByteBuffer metadata) |
void |
worker_cacheBlock(long workerId,
long workerUsedBytes,
long storageDirId,
long blockId,
long length)
Update information of the block newly cached to master, including used Tachyon space size in
bytes, the id of the storage directory in which the block is, the id of the block and the size
of the block in bytes.
|
Set<Integer> |
worker_getPinIdList() |
List<Integer> |
worker_getPriorityDependencyList() |
Command |
worker_heartbeat(long workerId,
long usedBytes,
List<Long> removedBlockIds,
Map<Long,List<Long>> addedBlockIds)
Heart beat between worker and master, worker update used Tachyon space in bytes, removed
blocks and added blocks in each storage directory by eviction and promotion to master, and
return the command from master to worker.
|
long |
worker_register(NetAddress workerNetAddress,
long totalBytes,
long usedBytes,
Map<Long,List<Long>> currentBlockIds)
Worker register and synch up capacity of Tachyon space, used space bytes and blocks in each
storage directory to master, the return value rv % 100,000 is really workerId, rv / 1000,000
is master started time.
|
public MasterServiceHandler(MasterInfo masterInfo)
public boolean addCheckpoint(long workerId,
int fileId,
long fileSizeBytes,
String checkpointPath)
throws FileDoesNotExistException,
SuspectedFileSizeException,
BlockInfoException,
org.apache.thrift.TException
addCheckpoint in interface MasterService.IfaceFileDoesNotExistExceptionSuspectedFileSizeExceptionBlockInfoExceptionorg.apache.thrift.TExceptionpublic ClientFileInfo getFileStatus(int fileId, String path) throws InvalidPathException, org.apache.thrift.TException
getFileStatus in interface MasterService.IfaceInvalidPathExceptionorg.apache.thrift.TExceptionpublic List<ClientWorkerInfo> getWorkersInfo() throws org.apache.thrift.TException
getWorkersInfo in interface MasterService.Ifaceorg.apache.thrift.TExceptionpublic List<ClientFileInfo> liststatus(String path) throws InvalidPathException, FileDoesNotExistException, org.apache.thrift.TException
liststatus in interface MasterService.IfaceInvalidPathExceptionFileDoesNotExistExceptionorg.apache.thrift.TExceptionpublic void user_completeFile(int fileId)
throws FileDoesNotExistException,
org.apache.thrift.TException
user_completeFile in interface MasterService.IfaceFileDoesNotExistExceptionorg.apache.thrift.TExceptionpublic int user_createDependency(List<String> parents, List<String> children, String commandPrefix, List<ByteBuffer> data, String comment, String framework, String frameworkVersion, int dependencyType, long childrenBlockSizeByte) throws InvalidPathException, FileDoesNotExistException, FileAlreadyExistException, BlockInfoException, TachyonException, org.apache.thrift.TException
user_createDependency in interface MasterService.IfaceInvalidPathExceptionFileDoesNotExistExceptionFileAlreadyExistExceptionBlockInfoExceptionTachyonExceptionorg.apache.thrift.TExceptionpublic int user_createFile(String path, String ufsPath, long blockSizeByte, boolean recursive) throws FileAlreadyExistException, InvalidPathException, BlockInfoException, SuspectedFileSizeException, TachyonException, org.apache.thrift.TException
user_createFile in interface MasterService.IfaceFileAlreadyExistExceptionInvalidPathExceptionBlockInfoExceptionSuspectedFileSizeExceptionTachyonExceptionorg.apache.thrift.TExceptionpublic long user_createNewBlock(int fileId)
throws FileDoesNotExistException,
org.apache.thrift.TException
user_createNewBlock in interface MasterService.IfaceFileDoesNotExistExceptionorg.apache.thrift.TExceptionpublic int user_createRawTable(String path, int columns, ByteBuffer metadata) throws FileAlreadyExistException, InvalidPathException, TableColumnException, TachyonException, org.apache.thrift.TException
user_createRawTable in interface MasterService.IfaceFileAlreadyExistExceptionInvalidPathExceptionTableColumnExceptionTachyonExceptionorg.apache.thrift.TExceptionpublic boolean user_delete(int fileId,
String path,
boolean recursive)
throws TachyonException,
org.apache.thrift.TException
MasterService.Ifaceuser_delete in interface MasterService.IfaceTachyonExceptionorg.apache.thrift.TExceptionpublic long user_getBlockId(int fileId,
int index)
throws FileDoesNotExistException,
org.apache.thrift.TException
user_getBlockId in interface MasterService.IfaceFileDoesNotExistExceptionorg.apache.thrift.TExceptionpublic ClientBlockInfo user_getClientBlockInfo(long blockId) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException
MasterService.Ifaceuser_getClientBlockInfo in interface MasterService.IfaceFileDoesNotExistExceptionBlockInfoExceptionorg.apache.thrift.TExceptionpublic ClientDependencyInfo user_getClientDependencyInfo(int dependencyId) throws DependencyDoesNotExistException, org.apache.thrift.TException
user_getClientDependencyInfo in interface MasterService.IfaceDependencyDoesNotExistExceptionorg.apache.thrift.TExceptionpublic ClientRawTableInfo user_getClientRawTableInfo(int id, String path) throws TableDoesNotExistException, InvalidPathException, org.apache.thrift.TException
MasterService.Ifaceuser_getClientRawTableInfo in interface MasterService.IfaceTableDoesNotExistExceptionInvalidPathExceptionorg.apache.thrift.TExceptionpublic List<ClientBlockInfo> user_getFileBlocks(int fileId, String path) throws FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
MasterService.Ifaceuser_getFileBlocks in interface MasterService.IfaceFileDoesNotExistExceptionInvalidPathExceptionorg.apache.thrift.TExceptionpublic int user_getRawTableId(String path) throws InvalidPathException, org.apache.thrift.TException
MasterService.Ifaceuser_getRawTableId in interface MasterService.IfaceInvalidPathExceptionorg.apache.thrift.TExceptionpublic String user_getUfsAddress() throws org.apache.thrift.TException
user_getUfsAddress in interface MasterService.Ifaceorg.apache.thrift.TExceptionpublic long user_getUserId()
throws org.apache.thrift.TException
user_getUserId in interface MasterService.Ifaceorg.apache.thrift.TExceptionpublic NetAddress user_getWorker(boolean random, String host) throws NoWorkerException, org.apache.thrift.TException
MasterService.Ifaceuser_getWorker in interface MasterService.IfaceNoWorkerExceptionorg.apache.thrift.TExceptionpublic void user_heartbeat()
throws org.apache.thrift.TException
MasterService.Ifaceuser_heartbeat in interface MasterService.Ifaceorg.apache.thrift.TExceptionpublic boolean user_mkdirs(String path, boolean recursive) throws FileAlreadyExistException, InvalidPathException, TachyonException, org.apache.thrift.TException
user_mkdirs in interface MasterService.IfaceFileAlreadyExistExceptionInvalidPathExceptionTachyonExceptionorg.apache.thrift.TExceptionpublic boolean user_rename(int fileId,
String srcPath,
String dstPath)
throws FileAlreadyExistException,
FileDoesNotExistException,
InvalidPathException,
org.apache.thrift.TException
user_rename in interface MasterService.IfaceFileAlreadyExistExceptionFileDoesNotExistExceptionInvalidPathExceptionorg.apache.thrift.TExceptionpublic void user_reportLostFile(int fileId)
throws FileDoesNotExistException,
org.apache.thrift.TException
user_reportLostFile in interface MasterService.IfaceFileDoesNotExistExceptionorg.apache.thrift.TExceptionpublic void user_requestFilesInDependency(int depId)
throws DependencyDoesNotExistException,
org.apache.thrift.TException
user_requestFilesInDependency in interface MasterService.IfaceDependencyDoesNotExistExceptionorg.apache.thrift.TExceptionpublic void user_setPinned(int fileId,
boolean pinned)
throws FileDoesNotExistException,
org.apache.thrift.TException
user_setPinned in interface MasterService.IfaceFileDoesNotExistExceptionorg.apache.thrift.TExceptionpublic boolean user_freepath(int fileId,
String path,
boolean recursive)
throws TachyonException,
org.apache.thrift.TException
user_freepath in interface MasterService.IfaceTachyonExceptionorg.apache.thrift.TExceptionpublic void user_updateRawTableMetadata(int tableId,
ByteBuffer metadata)
throws TableDoesNotExistException,
TachyonException,
org.apache.thrift.TException
user_updateRawTableMetadata in interface MasterService.IfaceTableDoesNotExistExceptionTachyonExceptionorg.apache.thrift.TExceptionpublic void worker_cacheBlock(long workerId,
long workerUsedBytes,
long storageDirId,
long blockId,
long length)
throws FileDoesNotExistException,
SuspectedFileSizeException,
BlockInfoException,
org.apache.thrift.TException
MasterService.Ifaceworker_cacheBlock in interface MasterService.IfaceFileDoesNotExistExceptionSuspectedFileSizeExceptionBlockInfoExceptionorg.apache.thrift.TExceptionpublic Set<Integer> worker_getPinIdList() throws org.apache.thrift.TException
worker_getPinIdList in interface MasterService.Ifaceorg.apache.thrift.TExceptionpublic List<Integer> worker_getPriorityDependencyList() throws org.apache.thrift.TException
worker_getPriorityDependencyList in interface MasterService.Ifaceorg.apache.thrift.TExceptionpublic Command worker_heartbeat(long workerId, long usedBytes, List<Long> removedBlockIds, Map<Long,List<Long>> addedBlockIds) throws BlockInfoException, org.apache.thrift.TException
MasterService.Ifaceworker_heartbeat in interface MasterService.IfaceBlockInfoExceptionorg.apache.thrift.TExceptionpublic long worker_register(NetAddress workerNetAddress, long totalBytes, long usedBytes, Map<Long,List<Long>> currentBlockIds) throws BlockInfoException, org.apache.thrift.TException
MasterService.Ifaceworker_register in interface MasterService.IfaceBlockInfoExceptionorg.apache.thrift.TExceptionCopyright © 2015. All Rights Reserved.