Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-1305

Running distcp with -delete incurs avoidable penalties

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.20.1
    • 0.21.0
    • distcp
    • None
    • 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)

      Attachments

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

        Activity

          People

            peter.romianowski Peter Romianowski
            peter.romianowski Peter Romianowski
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: