code: public static String toStringHadoopFileSplit(FileSplit fs) {
      StringBuilder sb = new StringBuilder();
      sb.append("HadoopFileSplit: Path: ").append(fs.getPath());
      sb.append(" , Start: ").append(fs.getStart());
      sb.append(" , Length: ").append(fs.getLength());
      sb.append(" , Hosts: ");
      String[] locs;
      try {
        locs = fs.getLocations();
      } catch (IOException e) {
        LOG.error(e.getMessage());
        locs = new String[] {};
      }
      for (String loc : locs) {
        sb.append(loc).append("; ");
      }
  
      return sb.toString();
    }
docs: Returns a string representation of a Hadoop {@link FileSplit}.
  
  @param fs Hadoop {@link FileSplit}
  @return its string representation