tachyon.command
Class Utils

java.lang.Object
  extended by tachyon.command.Utils

public class Utils
extends Object

Class for convenience methods used by TFsShell.


Constructor Summary
Utils()
           
 
Method Summary
static String getFilePath(String path)
          Removes header and hostname:port information from a path, leaving only the local file path.
static InetSocketAddress getTachyonMasterAddress(String path)
          Obtains the InetSocketAddress from a path by parsing the hostname:port portion of the path.
static String validateTachyonPath(String path)
          Validates the path, verifying that it contains the header and a hostname:port specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

validateTachyonPath

public static String validateTachyonPath(String path)
                                  throws InvalidPathException
Validates the path, verifying that it contains the header and a hostname:port specified.

Parameters:
path - The path to be verified.
Throws:
InvalidPathException

getFilePath

public static String getFilePath(String path)
                          throws InvalidPathException
Removes header and hostname:port information from a path, leaving only the local file path.

Parameters:
path - The path to obtain the local path from
Returns:
The local path in string format
Throws:
InvalidPathException

getTachyonMasterAddress

public static InetSocketAddress getTachyonMasterAddress(String path)
                                                 throws InvalidPathException
Obtains the InetSocketAddress from a path by parsing the hostname:port portion of the path.

Parameters:
path - The path to obtain the InetSocketAddress from.
Returns:
The InetSocketAddress of the master node.
Throws:
InvalidPathException


Copyright © 2013. All Rights Reserved.