code: public boolean isValidBlock(int namespaceId, Block b, boolean checkSize)
        throws IOException {
      File f = null;
      ;
      try {
        f = getValidateBlockFile(namespaceId, b, checkSize);
      } catch (IOException e) {
        DataNode.LOG.warn("Block " + b + " is not valid:", e);
      }
  
      return ((f != null) ? isBlockFinalizedWithLock(namespaceId, b) : false);
    }
docs: Check whether the given block is a valid one.