private String nameWithoutTaskID(String objectName){
  int index=objectName.indexOf("-" + HADOOP_ATTEMPT);
  if (index > 0) {
    String attempt=objectName.substring(objectName.lastIndexOf("-") + 1);
    try {
      TaskAttemptID.forName(attempt);
      return objectName.substring(0,index);
    }
 catch (    IllegalArgumentException e) {
      return objectName;
    }
  }
  return objectName;
}

private String nameWithoutTaskID ( String objectName ) { int index = objectName . indexOf ( "-" + HADOOP_ATTEMPT ) ; if ( index > 0 ) { String attempt = objectName . substring ( objectName . lastIndexOf ( "-" ) + 1 ) ; try { TaskAttemptID . forName ( attempt ) ; return objectName . substring ( 0 , index ) ; } catch ( IllegalArgumentException e ) { return objectName ; } } return objectName ; }
accepts any object name . if object name is of the form a / b / c / m . data / part - r - 00000 - 48ae3461 - 203f - 4dd3 - b141 - a45426e2d26c . csv - attempt_20160317132a_wrong_0000_m_000000_1 then a / b / c / m . data / part - r - 00000 - 48ae3461 - 203f - 4dd3 - b141 - a45426e2d26c . csv is returned . perform test that attempt_20160317132a_wrong_0000_m_000000_1 is valid task id identifier
