public float getBlockLocalityIndexForSsd(String host) {
    if (uniqueBlocksTotalWeight == 0) {
      return 0.0f;
    } else {
      return (float) getBlocksLocalityWeightInternal(host, HostAndWeight::getWeightForSsd)
        / (float) uniqueBlocksTotalWeight;
    }
  }
Get the block locality index for a ssd for a given host
@param host the host name
@return the locality index with ssd of the given host
hbase-common/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java