TaskID extends org.apache.hadoop.mapred.ID { public static char getRepresentingCharacter(TaskType type) { return CharTaskTypeMaps.getRepresentingCharacter(type); } TaskID(JobID jobId, TaskType type, int id);  TaskID(String jtIdentifier, int jobId, TaskType type, int id); @Deprecated  TaskID(JobID jobId, boolean isMap, int id); @Deprecated  TaskID(String jtIdentifier, int jobId, boolean isMap, int id);  TaskID(); JobID getJobID(); @Deprecated boolean isMap(); TaskType getTaskType(); @Override boolean equals(Object o); @Override int compareTo(ID o); @Override String toString(); @Override int hashCode(); @Override void readFields(DataInput in); @Override void write(DataOutput out); static TaskID forName(String str); static char getRepresentingCharacter(TaskType type); static TaskType getTaskType(char c); static String getAllTaskTypes(); static final String TASK_ID_REGEX; static final Pattern taskIdPattern; }
@Test public void testGetRepresentingCharacter() { assertEquals("The getRepresentingCharacter() method did not return the " + "expected character", 'm', TaskID.getRepresentingCharacter(TaskType.MAP)); assertEquals("The getRepresentingCharacter() method did not return the " + "expected character", 'r', TaskID.getRepresentingCharacter(TaskType.REDUCE)); assertEquals("The getRepresentingCharacter() method did not return the " + "expected character", 's', TaskID.getRepresentingCharacter(TaskType.JOB_SETUP)); assertEquals("The getRepresentingCharacter() method did not return the " + "expected character", 'c', TaskID.getRepresentingCharacter(TaskType.JOB_CLEANUP)); assertEquals("The getRepresentingCharacter() method did not return the " + "expected character", 't', TaskID.getRepresentingCharacter(TaskType.TASK_CLEANUP)); }