/** * Sends a 'Blocks Being Written' report to the given node. * * @param node the node to send the report to * @throws IOException */ public void sendBlocksBeingWrittenReport(DatanodeProtocol node, int namespaceId, DatanodeRegistration nsRegistration) throws IOException { Block[] blocks = data.getBlocksBeingWrittenReport(namespaceId); if (blocks != null && blocks.length != 0) { long[] blocksAsLong = BlockListAsLongs.convertToArrayLongs(blocks); BlockReport bbwReport = new BlockReport(blocksAsLong); node.blocksBeingWrittenReport(nsRegistration, bbwReport); } } }
long[] blocksBeingWritten = BlockListAsLongs.convertToArrayLongs(bbwReport); namenode.blocksBeingWrittenReport(dnRegistration, blocksBeingWritten);