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

EC: Add logic for striped blocks in isSufficientlyReplicated

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      Append ec file check if a block is replicated to at least the minimum replication need consider ec block.

      currently only the minimum replication of the replica is considered, the code is as follows:

      /**
         * Check if a block is replicated to at least the minimum replication.
         */
        public boolean isSufficientlyReplicated(BlockInfo b) {
          // Compare against the lesser of the minReplication and number of live DNs.
          final int liveReplicas = countNodes(b).liveReplicas();
          if (liveReplicas >= minReplication) {
            return true;
          }
          // getNumLiveDataNodes() is very expensive and we minimize its use by
          // comparing with minReplication first.
          return liveReplicas >= getDatanodeManager().getNumLiveDataNodes();
        }
      

      Attachments

        Issue Links

          Activity

            People

              haiyang Hu Haiyang Hu
              haiyang Hu Haiyang Hu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: