Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14574

[distcp] Add ability to increase the replication factor for fileList.seq

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • distcp
    • None

    Description

      distcp creates fileList.seq with default replication factor = 3.

      For large clusters runing distcp job with thousands of mappers, that 3-replica for the file listing file is not good enough, because DataNodes easily run out of max number of xceivers.

       

      It looks like we can pass in a distcp option, update replication factor in when creating the sequence file writer: https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java#L517-L521

       

      Like this:

      return SequenceFile.createWriter(getConf(),
              SequenceFile.Writer.file(pathToListFile),
              SequenceFile.Writer.keyClass(Text.class),
              SequenceFile.Writer.valueClass(CopyListingFileStatus.class),
              SequenceFile.Writer.compression(SequenceFile.CompressionType.NONE),
              SequenceFile.Writer.replication((short)100)); <-- this line
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            weichiu Wei-Chiu Chuang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: