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

Use proper blocksize to choose target for blocks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.6.0
    • None
    • None

    Description

      In BlockPlacementPolicyDefault.java:isGoodTarget, the passed-in blockSize is used to determine if there is enough room for a new block on a data node. However, in two conditions the blockSize might not be proper for the purpose: (a) the passed in block size is just the size of the last block of a file, which might be very small (for e.g., called from BlockManager.ReplicationWork.chooseTargets). (b) A file which might be created with a smaller blocksize.
      In these conditions, the calculated scheduledSize might be smaller than the actual value, which finally might lead to following failure of writing or replication.

      Attachments

        1. HDFS-7868-001.patch
          2 kB
          zhouyingchao

        Activity

          People

            leosun08 Lisheng Sun
            sinago zhouyingchao
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: