code: public void updateBlock(int namespaceId, Block oldblock, Block newblock, boolean finalize) throws IOException {
      LOG.info("namespaceId: " + namespaceId 
          + ", oldblock=" + oldblock + "(length=" + oldblock.getNumBytes()
          + "), newblock=" + newblock + "(length=" + newblock.getNumBytes()
          + "), datanode=" + getDatanodeInfo());
      data.updateBlock(namespaceId, oldblock, newblock);
      if (finalize) {
        data.finalizeBlockIfNeeded(namespaceId, newblock);
        myMetrics.blocksWritten.inc();
        notifyNamenodeReceivedBlock(namespaceId, newblock, null);
        LOG.info("Received block " + newblock +
                  " of size " + newblock.getNumBytes() +
                  " as part of lease recovery.");
      }
    }
docs: {@inheritDoc}