Uploaded image for project: 'Crunch'
  1. Crunch
  2. CRUNCH-580

FileTargetImpl#handleOutputs Inefficiency on S3NativeFileSystem

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.13.0
    • Fix Version/s: 0.14.0
    • Component/s: Core, IO
    • Labels:
      None
    • Environment:
      Amazon Elastic Map Reduce
    • Flags:
      Patch

      Description

      We have run in to a pretty frustrating inefficiency inside of org.apache.crunch.io.impl.FileTargetImpl#handleOutputs.

      This method loops over all of the partial output files and moves them to their ultimate destination directories, calling org.apache.hadoop.fs.FileSystem#rename(org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path) on each partial output in a loop.

      This is no problem when the org.apache.hadoop.fs.FileSystem in question is HDFS where #rename is a cheap operation, but when an implementation such as S3NativeFileSystem is used it is extremely inefficient, as each iteration through the loop makes a single blocking S3 API call, and this loop can be extremely long when there are many thousands of partial output files.

        Attachments

        1. CRUNCH-580.patch
          9 kB
          Jeffrey Quinn
        2. CRUNCH-580.patch
          8 kB
          Jeffrey Quinn

          Activity

            People

            • Assignee:
              jwills Josh Wills
              Reporter:
              jeffreyquinn Jeffrey Quinn
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: