code: @Override
    public void copyBlockLocal(String srcFileSystem, File srcBlockFile,
        int srcNamespaceId, Block srcBlock, int dstNamespaceId, Block dstBlock)
        throws IOException {
      File dstBlockFile = null;
      try {
        boolean hardlink = copyBlockLocalAdd(srcFileSystem, srcBlockFile,
            srcNamespaceId, srcBlock, dstNamespaceId, dstBlock);
  
        DatanodeBlockInfo binfo = volumeMap.get(dstNamespaceId, dstBlock);
        dstBlockFile = binfo.getDataFileToRead();
  
        // Copy files.
        copyFile(srcBlockFile, dstBlockFile, hardlink);
  
        // Copy metafile.
        if (!binfo.isInlineChecksum()) {
          File metaFileSrc = BlockWithChecksumFileWriter.getMetaFile(srcBlockFile, srcBlock);
          File metaFileDst = BlockWithChecksumFileWriter.getMetaFile(dstBlockFile, dstBlock);
          copyFile(metaFileSrc, metaFileDst, hardlink);
        }
  
        // Finalize block
        copyBlockLocalFinalize(dstNamespaceId, dstBlock, dstBlockFile);
      } catch (BlockAlreadyExistsException be) {
        throw be;
      } catch (IOException e) {
        unfinalizeBlock(dstNamespaceId, dstBlock);
        throw e;
      }
    }
docs: {@inheritDoc}