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 |
getClientFileInfoById(int id) |
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,
long blockSizeByte) |
int |
user_createFileOnCheckpoint(String path,
String checkpointPath) |
long |
user_createNewBlock(int fileId) |
int |
user_createRawTable(String path,
int columns,
ByteBuffer metadata) |
boolean |
user_deleteById(int id,
boolean recursive) |
boolean |
user_deleteByPath(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) |
ClientFileInfo |
user_getClientFileInfoByPath(String path) |
ClientRawTableInfo |
user_getClientRawTableInfoById(int id)
Get Table info by Table Id.
|
ClientRawTableInfo |
user_getClientRawTableInfoByPath(String path)
Get Table info by path
|
List<ClientBlockInfo> |
user_getFileBlocksById(int fileId)
Get file locations by file Id.
|
List<ClientBlockInfo> |
user_getFileBlocksByPath(String path)
Get file locations by path
|
int |
user_getFileId(String filePath)
Return -1 if does not contain the file, return fileId if it exists.
|
int |
user_getNumberOfFiles(String path) |
int |
user_getRawTableId(String path)
Return 0 if does not contain the Table, return fileId if it exists.
|
String |
user_getUnderfsAddress() |
long |
user_getUserId() |
NetAddress |
user_getWorker(boolean random,
String host)
Get local worker NetAddress
|
List<Integer> |
user_listFiles(String path,
boolean recursive) |
List<String> |
user_ls(String path,
boolean recursive) |
boolean |
user_mkdir(String path) |
void |
user_outOfMemoryForPinFile(int fileId) |
boolean |
user_rename(String srcPath,
String dstPath) |
void |
user_renameTo(int fileId,
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 blockId,
long length) |
Set<Integer> |
worker_getPinIdList() |
List<Integer> |
worker_getPriorityDependencyList() |
Command |
worker_heartbeat(long workerId,
long usedBytes,
List<Long> removedBlockIds) |
long |
worker_register(NetAddress workerNetAddress,
long totalBytes,
long usedBytes,
List<Long> currentBlockIds)
Worker register.
|
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.Iface
FileDoesNotExistException
SuspectedFileSizeException
BlockInfoException
org.apache.thrift.TException
public ClientFileInfo getClientFileInfoById(int id) throws FileDoesNotExistException, org.apache.thrift.TException
getClientFileInfoById
in interface MasterService.Iface
FileDoesNotExistException
org.apache.thrift.TException
public List<ClientWorkerInfo> getWorkersInfo() throws org.apache.thrift.TException
getWorkersInfo
in interface MasterService.Iface
org.apache.thrift.TException
public List<ClientFileInfo> liststatus(String path) throws InvalidPathException, FileDoesNotExistException, org.apache.thrift.TException
liststatus
in interface MasterService.Iface
InvalidPathException
FileDoesNotExistException
org.apache.thrift.TException
public void user_completeFile(int fileId) throws FileDoesNotExistException, org.apache.thrift.TException
user_completeFile
in interface MasterService.Iface
FileDoesNotExistException
org.apache.thrift.TException
public 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.Iface
InvalidPathException
FileDoesNotExistException
FileAlreadyExistException
BlockInfoException
TachyonException
org.apache.thrift.TException
public int user_createFile(String path, long blockSizeByte) throws FileAlreadyExistException, InvalidPathException, BlockInfoException, TachyonException, org.apache.thrift.TException
user_createFile
in interface MasterService.Iface
FileAlreadyExistException
InvalidPathException
BlockInfoException
TachyonException
org.apache.thrift.TException
public int user_createFileOnCheckpoint(String path, String checkpointPath) throws FileAlreadyExistException, InvalidPathException, SuspectedFileSizeException, BlockInfoException, TachyonException, org.apache.thrift.TException
user_createFileOnCheckpoint
in interface MasterService.Iface
FileAlreadyExistException
InvalidPathException
SuspectedFileSizeException
BlockInfoException
TachyonException
org.apache.thrift.TException
public long user_createNewBlock(int fileId) throws FileDoesNotExistException, org.apache.thrift.TException
user_createNewBlock
in interface MasterService.Iface
FileDoesNotExistException
org.apache.thrift.TException
public int user_createRawTable(String path, int columns, ByteBuffer metadata) throws FileAlreadyExistException, InvalidPathException, TableColumnException, TachyonException, org.apache.thrift.TException
user_createRawTable
in interface MasterService.Iface
FileAlreadyExistException
InvalidPathException
TableColumnException
TachyonException
org.apache.thrift.TException
public boolean user_deleteById(int id, boolean recursive) throws TachyonException, org.apache.thrift.TException
user_deleteById
in interface MasterService.Iface
TachyonException
org.apache.thrift.TException
public boolean user_deleteByPath(String path, boolean recursive) throws TachyonException, org.apache.thrift.TException
user_deleteByPath
in interface MasterService.Iface
TachyonException
org.apache.thrift.TException
public long user_getBlockId(int fileId, int index) throws FileDoesNotExistException, org.apache.thrift.TException
user_getBlockId
in interface MasterService.Iface
FileDoesNotExistException
org.apache.thrift.TException
public ClientBlockInfo user_getClientBlockInfo(long blockId) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException
MasterService.Iface
user_getClientBlockInfo
in interface MasterService.Iface
FileDoesNotExistException
BlockInfoException
org.apache.thrift.TException
public ClientDependencyInfo user_getClientDependencyInfo(int dependencyId) throws DependencyDoesNotExistException, org.apache.thrift.TException
user_getClientDependencyInfo
in interface MasterService.Iface
DependencyDoesNotExistException
org.apache.thrift.TException
public ClientFileInfo user_getClientFileInfoByPath(String path) throws FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
user_getClientFileInfoByPath
in interface MasterService.Iface
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public ClientRawTableInfo user_getClientRawTableInfoById(int id) throws TableDoesNotExistException, org.apache.thrift.TException
MasterService.Iface
user_getClientRawTableInfoById
in interface MasterService.Iface
TableDoesNotExistException
org.apache.thrift.TException
public ClientRawTableInfo user_getClientRawTableInfoByPath(String path) throws TableDoesNotExistException, InvalidPathException, org.apache.thrift.TException
MasterService.Iface
user_getClientRawTableInfoByPath
in interface MasterService.Iface
TableDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public List<ClientBlockInfo> user_getFileBlocksById(int fileId) throws FileDoesNotExistException, org.apache.thrift.TException
MasterService.Iface
user_getFileBlocksById
in interface MasterService.Iface
FileDoesNotExistException
org.apache.thrift.TException
public List<ClientBlockInfo> user_getFileBlocksByPath(String path) throws FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
MasterService.Iface
user_getFileBlocksByPath
in interface MasterService.Iface
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public int user_getFileId(String filePath) throws InvalidPathException, org.apache.thrift.TException
MasterService.Iface
user_getFileId
in interface MasterService.Iface
InvalidPathException
org.apache.thrift.TException
public int user_getNumberOfFiles(String path) throws FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
user_getNumberOfFiles
in interface MasterService.Iface
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public int user_getRawTableId(String path) throws InvalidPathException, org.apache.thrift.TException
MasterService.Iface
user_getRawTableId
in interface MasterService.Iface
InvalidPathException
org.apache.thrift.TException
public String user_getUnderfsAddress() throws org.apache.thrift.TException
user_getUnderfsAddress
in interface MasterService.Iface
org.apache.thrift.TException
public long user_getUserId() throws org.apache.thrift.TException
user_getUserId
in interface MasterService.Iface
org.apache.thrift.TException
public NetAddress user_getWorker(boolean random, String host) throws NoWorkerException, org.apache.thrift.TException
MasterService.Iface
user_getWorker
in interface MasterService.Iface
NoWorkerException
org.apache.thrift.TException
public List<Integer> user_listFiles(String path, boolean recursive) throws FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
user_listFiles
in interface MasterService.Iface
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public List<String> user_ls(String path, boolean recursive) throws FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
user_ls
in interface MasterService.Iface
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public boolean user_mkdir(String path) throws FileAlreadyExistException, InvalidPathException, TachyonException, org.apache.thrift.TException
user_mkdir
in interface MasterService.Iface
FileAlreadyExistException
InvalidPathException
TachyonException
org.apache.thrift.TException
public void user_outOfMemoryForPinFile(int fileId) throws org.apache.thrift.TException
user_outOfMemoryForPinFile
in interface MasterService.Iface
org.apache.thrift.TException
public boolean user_rename(String srcPath, String dstPath) throws FileAlreadyExistException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
user_rename
in interface MasterService.Iface
FileAlreadyExistException
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public void user_renameTo(int fileId, String dstPath) throws FileAlreadyExistException, FileDoesNotExistException, InvalidPathException, org.apache.thrift.TException
user_renameTo
in interface MasterService.Iface
FileAlreadyExistException
FileDoesNotExistException
InvalidPathException
org.apache.thrift.TException
public void user_reportLostFile(int fileId) throws FileDoesNotExistException, org.apache.thrift.TException
user_reportLostFile
in interface MasterService.Iface
FileDoesNotExistException
org.apache.thrift.TException
public void user_requestFilesInDependency(int depId) throws DependencyDoesNotExistException, org.apache.thrift.TException
user_requestFilesInDependency
in interface MasterService.Iface
DependencyDoesNotExistException
org.apache.thrift.TException
public void user_setPinned(int fileId, boolean pinned) throws FileDoesNotExistException, org.apache.thrift.TException
user_setPinned
in interface MasterService.Iface
FileDoesNotExistException
org.apache.thrift.TException
public void user_updateRawTableMetadata(int tableId, ByteBuffer metadata) throws TableDoesNotExistException, TachyonException, org.apache.thrift.TException
user_updateRawTableMetadata
in interface MasterService.Iface
TableDoesNotExistException
TachyonException
org.apache.thrift.TException
public void worker_cacheBlock(long workerId, long workerUsedBytes, long blockId, long length) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException
worker_cacheBlock
in interface MasterService.Iface
FileDoesNotExistException
SuspectedFileSizeException
BlockInfoException
org.apache.thrift.TException
public Set<Integer> worker_getPinIdList() throws org.apache.thrift.TException
worker_getPinIdList
in interface MasterService.Iface
org.apache.thrift.TException
public List<Integer> worker_getPriorityDependencyList() throws org.apache.thrift.TException
worker_getPriorityDependencyList
in interface MasterService.Iface
org.apache.thrift.TException
public Command worker_heartbeat(long workerId, long usedBytes, List<Long> removedBlockIds) throws BlockInfoException, org.apache.thrift.TException
worker_heartbeat
in interface MasterService.Iface
BlockInfoException
org.apache.thrift.TException
public long worker_register(NetAddress workerNetAddress, long totalBytes, long usedBytes, List<Long> currentBlockIds) throws BlockInfoException, org.apache.thrift.TException
MasterService.Iface
worker_register
in interface MasterService.Iface
BlockInfoException
org.apache.thrift.TException
Copyright © 2014. All rights reserved.