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 SummaryConstructors Constructor Description IDHandler()
 - 
Method SummaryAll 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 StringobtainProcessID()
 
- 
- 
- 
Method Detail- 
extractIntIDpublic static int extractIntID(String taskID) 
 - 
concatIntIDsToLongpublic static long concatIntIDsToLong(int part1, int part2)
 - 
extractIntIDFromLongpublic static int extractIntIDFromLong(long val, int part)Extract int ID from long value- Parameters:
- val- long value
- part- 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!
 
 - 
createDistributedUniqueIDpublic static String createDistributedUniqueID() Creates a unique identifier with the pattern <process_id>_<host_ip>.- Returns:
- distributed unique id
 
 - 
obtainProcessIDpublic static String obtainProcessID() 
 
- 
 
-