errose28 commented on a change in pull request #1298: URL: https://github.com/apache/hadoop-ozone/pull/1298#discussion_r482267578
########## File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/BlockManagerImpl.java ########## @@ -324,14 +328,14 @@ public void shutdown() { private byte[] getBlockByID(ReferenceCountedDB db, BlockID blockID) throws IOException { - byte[] blockKey = Longs.toByteArray(blockID.getLocalID()); + String blockKey = Long.toString(blockID.getLocalID()); - byte[] blockData = db.getStore().get(blockKey); + BlockData blockData = db.getStore().getBlockDataTable().get(blockKey); if (blockData == null) { throw new StorageContainerException(NO_SUCH_BLOCK_ERR_MSG, NO_SUCH_BLOCK); } - return blockData; + return blockData.getProtoBufMessage().toByteArray(); Review comment: Good catch. We could fix it here since this pull request moves the coding/decoding into the tables and away from the caller, or do it in a new Jira. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org