code: public String extractFinalKeyFromTemporaryPath(Path path, boolean addTaskId,
        String dataRoot, boolean addRoot) throws IOException {
      String res;
      if (tempFileOriginator.equals(DEFAULT_FOUTPUTCOMMITTER_V1)) {
        res = parseHadoopOutputCommitter(path, addTaskId, hostNameScheme);
      } else {
        res = extractNameFromTempPath(path, addTaskId, hostNameScheme);
      }
      if (!res.equals("")) {
        if (addRoot) {
          if (res != null && res.startsWith("/")) {
            res = res.substring(1);
          }
          return dataRoot + "/" + res;
        }
        return res;
      }
      return path.toString();
    }
docs: Transform temporary path to the final destination
  For example:
  scheme://a.service/data.txt/_temporary/0/_temporary/"
  + "attempt_201610052038_0001_m_000007_15";
  transformed to  a/data.txt
  
  @param path the input path
  @param addTaskId add task id composite
  @param dataRoot the data root
  @param addRoot add or not the data root to the path (bucket) as a prefix
  @return object name without temporary path
  @throws IOException if object name is missing