tachyon
Class MasterInfo

java.lang.Object
  extended by tachyon.MasterInfo

public class MasterInfo
extends Object

A global view of filesystem in master.


Nested Class Summary
 class MasterInfo.MasterHeartbeatExecutor
          System periodical status check.
 class MasterInfo.RecomputeCmd
           
 
Field Summary
static String COL
           
 
Constructor Summary
MasterInfo(InetSocketAddress address)
           
 
Method Summary
 boolean addCheckpoint(long workerId, int fileId, long fileSizeBytes, String checkpointPath)
           
 void cachedFile(long workerId, long workerUsedBytes, int fileId, long fileSizeBytes)
           
 int createFile(boolean recursive, String path, boolean directory, int columns, ByteBuffer metadata)
           
 int createFile(String path, boolean directory)
           
 int createRawTable(String path, int columns, ByteBuffer metadata)
           
 void delete(int id)
           
 void delete(String path)
           
 long getCapacityBytes()
           
 ClientFileInfo getClientFileInfo(int id)
           
 ClientFileInfo getClientFileInfo(String path)
           
 ClientRawTableInfo getClientRawTableInfo(int id)
           
 ClientRawTableInfo getClientRawTableInfo(String path)
           
 int getFileId(String filePath)
           
 ClientFileInfo getFileInfo(String path)
           
 List<NetAddress> getFileLocations(int fileId)
           
 List<NetAddress> getFileLocations(String path)
           
 String getFileNameById(int fileId)
           
 List<Integer> getFilesIds(List<String> pathList)
           
 List<ClientFileInfo> getFilesInfo(String path)
           
 List<String> getInMemoryFiles()
          Get absolute paths of all in memory files.
 InetSocketAddress getMasterAddress()
           
 long getNewUserId()
           
 int getNumberOfFiles(String path)
           
 List<Integer> getPinIdList()
           
 List<String> getPinList()
           
 int getRawTableId(String path)
           
 long getStarttimeMs()
           
 long getUsedBytes()
           
 List<String> getWhiteList()
           
 NetAddress getWorker(boolean random, String host)
           
 int getWorkerCount()
           
 List<ClientWorkerInfo> getWorkersInfo()
           
 List<Integer> listFiles(String path, boolean recursive)
           
 List<String> ls(String path, boolean recursive)
           
 long registerWorker(NetAddress workerNetAddress, long totalBytes, long usedBytes, List<Integer> currentFileIds)
           
 void renameFile(String srcPath, String dstPath)
           
 void stop()
           
 void unpinFile(int fileId)
           
 void updateRawTableMetadata(int tableId, ByteBuffer metadata)
           
 Command workerHeartbeat(long workerId, long usedBytes, List<Integer> removedFileIds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COL

public static final String COL
See Also:
Constant Field Values
Constructor Detail

MasterInfo

public MasterInfo(InetSocketAddress address)
           throws IOException
Throws:
IOException
Method Detail

addCheckpoint

public boolean addCheckpoint(long workerId,
                             int fileId,
                             long fileSizeBytes,
                             String checkpointPath)
                      throws FileDoesNotExistException,
                             SuspectedFileSizeException
Throws:
FileDoesNotExistException
SuspectedFileSizeException

cachedFile

public void cachedFile(long workerId,
                       long workerUsedBytes,
                       int fileId,
                       long fileSizeBytes)
                throws FileDoesNotExistException,
                       SuspectedFileSizeException
Parameters:
workerId -
workerUsedBytes -
fileId -
fileSizeBytes -
Throws:
FileDoesNotExistException
SuspectedFileSizeException

createFile

public int createFile(String path,
                      boolean directory)
               throws FileAlreadyExistException,
                      InvalidPathException
Throws:
FileAlreadyExistException
InvalidPathException

createFile

public int createFile(boolean recursive,
                      String path,
                      boolean directory,
                      int columns,
                      ByteBuffer metadata)
               throws FileAlreadyExistException,
                      InvalidPathException
Throws:
FileAlreadyExistException
InvalidPathException

createRawTable

public int createRawTable(String path,
                          int columns,
                          ByteBuffer metadata)
                   throws FileAlreadyExistException,
                          InvalidPathException,
                          TableColumnException
Throws:
FileAlreadyExistException
InvalidPathException
TableColumnException

delete

public void delete(int id)

delete

public void delete(String path)
            throws InvalidPathException,
                   FileDoesNotExistException
Throws:
InvalidPathException
FileDoesNotExistException

getCapacityBytes

public long getCapacityBytes()

getClientFileInfo

public ClientFileInfo getClientFileInfo(int id)
                                 throws FileDoesNotExistException
Throws:
FileDoesNotExistException

getClientFileInfo

public ClientFileInfo getClientFileInfo(String path)
                                 throws FileDoesNotExistException,
                                        InvalidPathException
Throws:
FileDoesNotExistException
InvalidPathException

getClientRawTableInfo

public ClientRawTableInfo getClientRawTableInfo(int id)
                                         throws TableDoesNotExistException
Throws:
TableDoesNotExistException

getClientRawTableInfo

public ClientRawTableInfo getClientRawTableInfo(String path)
                                         throws TableDoesNotExistException,
                                                InvalidPathException
Throws:
TableDoesNotExistException
InvalidPathException

getFilesInfo

public List<ClientFileInfo> getFilesInfo(String path)
                                  throws FileDoesNotExistException,
                                         InvalidPathException
Throws:
FileDoesNotExistException
InvalidPathException

getFileInfo

public ClientFileInfo getFileInfo(String path)
                           throws FileDoesNotExistException,
                                  InvalidPathException
Throws:
FileDoesNotExistException
InvalidPathException

getFileNameById

public String getFileNameById(int fileId)
                       throws FileDoesNotExistException
Throws:
FileDoesNotExistException

getFileLocations

public List<NetAddress> getFileLocations(int fileId)
                                  throws FileDoesNotExistException,
                                         IOException
Throws:
FileDoesNotExistException
IOException

getFileLocations

public List<NetAddress> getFileLocations(String path)
                                  throws FileDoesNotExistException,
                                         InvalidPathException,
                                         IOException
Throws:
FileDoesNotExistException
InvalidPathException
IOException

getFileId

public int getFileId(String filePath)
              throws InvalidPathException
Throws:
InvalidPathException

getFilesIds

public List<Integer> getFilesIds(List<String> pathList)
                          throws InvalidPathException,
                                 FileDoesNotExistException
Throws:
InvalidPathException
FileDoesNotExistException

getInMemoryFiles

public List<String> getInMemoryFiles()
Get absolute paths of all in memory files.

Returns:
absolute paths of all in memory files.

getMasterAddress

public InetSocketAddress getMasterAddress()

getNewUserId

public long getNewUserId()

getNumberOfFiles

public int getNumberOfFiles(String path)
                     throws InvalidPathException,
                            FileDoesNotExistException
Throws:
InvalidPathException
FileDoesNotExistException

getPinList

public List<String> getPinList()

getPinIdList

public List<Integer> getPinIdList()

getRawTableId

public int getRawTableId(String path)
                  throws InvalidPathException
Throws:
InvalidPathException

getStarttimeMs

public long getStarttimeMs()

getUsedBytes

public long getUsedBytes()

getWorker

public NetAddress getWorker(boolean random,
                            String host)
                     throws NoLocalWorkerException
Throws:
NoLocalWorkerException

getWorkerCount

public int getWorkerCount()

getWorkersInfo

public List<ClientWorkerInfo> getWorkersInfo()

getWhiteList

public List<String> getWhiteList()

listFiles

public List<Integer> listFiles(String path,
                               boolean recursive)
                        throws InvalidPathException,
                               FileDoesNotExistException
Throws:
InvalidPathException
FileDoesNotExistException

ls

public List<String> ls(String path,
                       boolean recursive)
                throws InvalidPathException,
                       FileDoesNotExistException
Throws:
InvalidPathException
FileDoesNotExistException

registerWorker

public long registerWorker(NetAddress workerNetAddress,
                           long totalBytes,
                           long usedBytes,
                           List<Integer> currentFileIds)

renameFile

public void renameFile(String srcPath,
                       String dstPath)
                throws FileAlreadyExistException,
                       FileDoesNotExistException,
                       InvalidPathException
Throws:
FileAlreadyExistException
FileDoesNotExistException
InvalidPathException

unpinFile

public void unpinFile(int fileId)
               throws FileDoesNotExistException
Throws:
FileDoesNotExistException

updateRawTableMetadata

public void updateRawTableMetadata(int tableId,
                                   ByteBuffer metadata)
                            throws TableDoesNotExistException
Throws:
TableDoesNotExistException

workerHeartbeat

public Command workerHeartbeat(long workerId,
                               long usedBytes,
                               List<Integer> removedFileIds)

stop

public void stop()


Copyright © 2013. All Rights Reserved.