public class MasterClient extends Object
Constructor and Description |
---|
MasterClient(InetSocketAddress masterAddress) |
MasterClient(InetSocketAddress masterAddress,
boolean useZookeeper) |
Modifier and Type | Method and Description |
---|---|
boolean |
addCheckpoint(long workerId,
int fileId,
long length,
String checkpointPath) |
void |
cleanConnect()
Clean the connect.
|
void |
connect()
Connects to the Tachyon Master; an exception is thrown if this fails.
|
ClientDependencyInfo |
getClientDependencyInfo(int did) |
ClientFileInfo |
getClientFileInfoById(int id) |
long |
getUserId() |
List<ClientWorkerInfo> |
getWorkersInfo() |
boolean |
isConnected() |
List<ClientFileInfo> |
listStatus(String path) |
void |
shutdown() |
void |
user_completeFile(int fId) |
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 fId) |
int |
user_createRawTable(String path,
int columns,
ByteBuffer metadata) |
boolean |
user_delete(int fileId,
boolean recursive) |
boolean |
user_delete(String path,
boolean recursive) |
long |
user_getBlockId(int fId,
int index) |
ClientBlockInfo |
user_getClientBlockInfo(long blockId) |
ClientFileInfo |
user_getClientFileInfoByPath(String path) |
ClientRawTableInfo |
user_getClientRawTableInfoById(int id) |
ClientRawTableInfo |
user_getClientRawTableInfoByPath(String path) |
List<ClientBlockInfo> |
user_getFileBlocks(int id) |
int |
user_getFileId(String path) |
int |
user_getNumberOfFiles(String folderPath) |
int |
user_getRawTableId(String path) |
String |
user_getUnderfsAddress() |
NetAddress |
user_getWorker(boolean random,
String hostname) |
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 fId,
String path) |
void |
user_reportLostFile(int fileId) |
void |
user_requestFilesInDependency(int depId) |
void |
user_setPinned(int id,
boolean pinned) |
void |
user_updateRawTableMetadata(int id,
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> removedPartitionList) |
long |
worker_register(NetAddress workerNetAddress,
long totalBytes,
long usedBytes,
List<Long> currentBlockList)
Register the worker to the master.
|
public MasterClient(InetSocketAddress masterAddress)
public MasterClient(InetSocketAddress masterAddress, boolean useZookeeper)
public boolean addCheckpoint(long workerId, int fileId, long length, String checkpointPath) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException
workerId
- if -1, means the checkpoint is added directly by the client from underlayer fs.fileId
- length
- checkpointPath
- FileDoesNotExistException
SuspectedFileSizeException
BlockInfoException
org.apache.thrift.TException
public void cleanConnect()
public void connect() throws org.apache.thrift.TException
org.apache.thrift.TException
public ClientDependencyInfo getClientDependencyInfo(int did) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public ClientFileInfo getClientFileInfoById(int id) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public long getUserId() throws org.apache.thrift.TException
org.apache.thrift.TException
public List<ClientWorkerInfo> getWorkersInfo() throws org.apache.thrift.TException
org.apache.thrift.TException
public boolean isConnected()
public List<ClientFileInfo> listStatus(String path) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public void shutdown()
public void user_completeFile(int fId) throws IOException, org.apache.thrift.TException
IOException
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 IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public int user_createFile(String path, long blockSizeByte) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public int user_createFileOnCheckpoint(String path, String checkpointPath) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public long user_createNewBlock(int fId) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public int user_createRawTable(String path, int columns, ByteBuffer metadata) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public boolean user_delete(int fileId, boolean recursive) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public boolean user_delete(String path, boolean recursive) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public long user_getBlockId(int fId, int index) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public ClientBlockInfo user_getClientBlockInfo(long blockId) throws FileDoesNotExistException, BlockInfoException, org.apache.thrift.TException
FileDoesNotExistException
BlockInfoException
org.apache.thrift.TException
public ClientFileInfo user_getClientFileInfoByPath(String path) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public ClientRawTableInfo user_getClientRawTableInfoById(int id) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public ClientRawTableInfo user_getClientRawTableInfoByPath(String path) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public List<ClientBlockInfo> user_getFileBlocks(int id) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public int user_getFileId(String path) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public int user_getNumberOfFiles(String folderPath) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public int user_getRawTableId(String path) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public String user_getUnderfsAddress() throws org.apache.thrift.TException
org.apache.thrift.TException
public NetAddress user_getWorker(boolean random, String hostname) throws NoWorkerException, org.apache.thrift.TException
NoWorkerException
org.apache.thrift.TException
public List<Integer> user_listFiles(String path, boolean recursive) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public List<String> user_ls(String path, boolean recursive) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public boolean user_mkdir(String path) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public void user_outOfMemoryForPinFile(int fileId) throws org.apache.thrift.TException
org.apache.thrift.TException
public boolean user_rename(String srcPath, String dstPath) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public void user_renameTo(int fId, String path) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public void user_reportLostFile(int fileId) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public void user_requestFilesInDependency(int depId) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public void user_setPinned(int id, boolean pinned) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public void user_updateRawTableMetadata(int id, ByteBuffer metadata) throws IOException, org.apache.thrift.TException
IOException
org.apache.thrift.TException
public void worker_cacheBlock(long workerId, long workerUsedBytes, long blockId, long length) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException
FileDoesNotExistException
SuspectedFileSizeException
BlockInfoException
org.apache.thrift.TException
public Set<Integer> worker_getPinIdList() throws org.apache.thrift.TException
org.apache.thrift.TException
public List<Integer> worker_getPriorityDependencyList() throws org.apache.thrift.TException
org.apache.thrift.TException
public Command worker_heartbeat(long workerId, long usedBytes, List<Long> removedPartitionList) throws BlockInfoException, org.apache.thrift.TException
BlockInfoException
org.apache.thrift.TException
public long worker_register(NetAddress workerNetAddress, long totalBytes, long usedBytes, List<Long> currentBlockList) throws BlockInfoException, org.apache.thrift.TException
workerNetAddress
- Worker's NetAddresstotalBytes
- Worker's capacityusedBytes
- Worker's used storagecurrentBlockList
- Blocks in worker's space.BlockInfoException
org.apache.thrift.TException
Copyright © 2014. All rights reserved.