tachyon
Class CommonUtils
java.lang.Object
tachyon.CommonUtils
public final class CommonUtils
- extends Object
Common utilities shared by all components in Tachyon.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cleanPath
public static String cleanPath(String path)
cloneByteBuffer
public static ByteBuffer cloneByteBuffer(ByteBuffer buf)
cloneByteBufferList
public static List<ByteBuffer> cloneByteBufferList(List<ByteBuffer> source)
convertByteArrayToString
public static String convertByteArrayToString(byte[] data)
convertMsToClockTime
public static String convertMsToClockTime(long Millis)
convertMsToShortClockTime
public static String convertMsToShortClockTime(long Millis)
convertMsToDate
public static String convertMsToDate(long Millis)
convertMsToSimpleDate
public static String convertMsToSimpleDate(long Millis)
generateNewByteBufferFromThriftRPCResults
public static ByteBuffer generateNewByteBufferFromThriftRPCResults(ByteBuffer data)
getCurrentMs
public static long getCurrentMs()
getCurrentNs
public static long getCurrentNs()
getFileIdFromFileName
public static int getFileIdFromFileName(String name)
getMB
public static int getMB(int bytes)
getSizeFromBytes
public static String getSizeFromBytes(long bytes)
illegalArgumentException
public static void illegalArgumentException(String msg)
illegalArgumentException
public static void illegalArgumentException(Exception e)
listToString
public static <T> String listToString(List<T> list)
parametersToString
public static String parametersToString(Object... objs)
parseMemorySize
public static long parseMemorySize(String memorySize)
printByteBuffer
public static void printByteBuffer(org.apache.log4j.Logger LOG,
ByteBuffer buf)
printTimeTakenMs
public static void printTimeTakenMs(long startTimeMs,
org.apache.log4j.Logger logger,
String message)
printTimeTakenNs
public static void printTimeTakenNs(long startTimeNs,
org.apache.log4j.Logger logger,
String message)
runtimeException
public static void runtimeException(String msg)
runtimeException
public static void runtimeException(Exception e)
sleepMs
public static void sleepMs(org.apache.log4j.Logger logger,
long timeMs)
toStringArray
public static String[] toStringArray(ArrayList<String> src)
tempoaryLog
public static void tempoaryLog(String msg)
validatePath
public static void validatePath(String path)
throws InvalidPathException
- Throws:
InvalidPathException
Copyright © 2013. All Rights Reserved.