code: public long getFinalizedBlockLength(int namespaceId, Block b) throws IOException {
      DatanodeBlockInfo info = volumeMap.get(namespaceId, b);
      if (info == null) {
        throw new IOException("Can't find block " + b + " in volumeMap");
      }
      return info.getFinalizedSize();
    }
docs: Find the block's on-disk length