Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-1305

Running distcp with -delete incurs avoidable penalties

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.1
    • Fix Version/s: 0.21.0
    • Component/s: distcp
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      First problem

      In org.apache.hadoop.tools.DistCp#deleteNonexisting we serialize FileStatus objects when the path is all we need.

      The performance problem comes from org.apache.hadoop.fs.RawLocalFileSystem.RawLocalFileStatus#write which tries to retrieve file permissions by issuing a "ls -ld <path>" which is painfully slow.

      Changed that to just serialize Path and not FileStatus.

      Second problem

      To delete the files we invoke the "hadoop" command line tool with option "-rmr <path>". Again, for each file.

      Changed that to dstfs.delete(path, true)

      1. MAPREDUCE-1305.patch
        2 kB
        Peter Romianowski
      2. M1305-2.patch
        6 kB
        Chris Douglas
      3. M1305-1.patch
        4 kB
        Chris Douglas

        Activity

          People

          • Assignee:
            Peter Romianowski
            Reporter:
            Peter Romianowski
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development