Class IDHandler
- java.lang.Object
 - 
- org.apache.sysds.runtime.controlprogram.parfor.util.IDHandler
 
 
- 
public class IDHandler extends Object
Functionalities for extracting numeric IDs from Hadoop taskIDs and other things related to modification of IDs. NOTE: Many those functionalities rely on a big endian format. This is always given because Java stores everything as big endian, independent of the platform. Furthermore, we rely on Long.MAX_VALUE in order to prevent numeric overflows with regard to signed data types. 
- 
- 
Constructor Summary
Constructors Constructor Description IDHandler() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longconcatIntIDsToLong(int part1, int part2)static StringcreateDistributedUniqueID()Creates a unique identifier with the pattern <process_id>_<host_ip>.static intextractIntID(String taskID)static intextractIntIDFromLong(long val, int part)Extract int ID from long valuestatic StringgetIPAddress(boolean noLocal)static longgetProcessID() 
 - 
 
- 
- 
Method Detail
- 
extractIntID
public static int extractIntID(String taskID)
 
- 
concatIntIDsToLong
public static long concatIntIDsToLong(int part1, int part2) 
- 
extractIntIDFromLong
public static int extractIntIDFromLong(long val, int part)Extract int ID from long value- Parameters:
 val- long valuepart- if part is 1, use first 4 bytes. if part is 2, use second 4 bytes!- Returns:
 - return int id, or -1 if part is not 1 or 2!
 
 
- 
createDistributedUniqueID
public static String createDistributedUniqueID()
Creates a unique identifier with the pattern <process_id>_<host_ip>.- Returns:
 - distributed unique id
 
 
- 
getProcessID
public static long getProcessID()
 
- 
getIPAddress
public static String getIPAddress(boolean noLocal) throws SocketException, UnknownHostException
- Throws:
 SocketExceptionUnknownHostException
 
 - 
 
 -