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. M1305-1.patch
        4 kB
        Chris Douglas
      2. M1305-2.patch
        6 kB
        Chris Douglas
      3. MAPREDUCE-1305.patch
        2 kB
        Peter Romianowski

        Activity

        Peter Romianowski created issue -
        Peter Romianowski made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Peter Romianowski made changes -
        Attachment MAPRED-1305.patch [ 12428234 ]
        Peter Romianowski made changes -
        Attachment MAPRED-1305.patch [ 12428234 ]
        Peter Romianowski made changes -
        Attachment MAPREDUCE-1305.patch [ 12428316 ]
        Chris Douglas made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Chris Douglas made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Chris Douglas made changes -
        Attachment M1305-1.patch [ 12435417 ]
        Chris Douglas made changes -
        Attachment M1305-2.patch [ 12435423 ]
        Chris Douglas made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Chris Douglas made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Chris Douglas made changes -
        Summary Massive performance problem with DistCp and -delete Running distcp with -delete incurs avoidable penalties
        Tsz Wo Nicholas Sze made changes -
        Hadoop Flags [Reviewed]
        Chris Douglas made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.22.0 [ 12314184 ]
        Resolution Fixed [ 1 ]
        Tom White made changes -
        Fix Version/s 0.21.0 [ 12314045 ]
        Fix Version/s 0.22.0 [ 12314184 ]
        Tom White made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development