You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/12/06 09:27:58 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #317: HDDS-2668. Sonar : fix issues reported in BlockManagerImpl

adoroszlai commented on a change in pull request #317: HDDS-2668. Sonar : fix issues reported in BlockManagerImpl
URL: https://github.com/apache/hadoop-ozone/pull/317#discussion_r354734193
 
 

 ##########
 File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/BlockManagerImpl.java
 ##########
 @@ -162,8 +164,8 @@ public BlockData getBlock(Container container, BlockID blockID)
       }
       byte[] kData = db.getStore().get(Longs.toByteArray(blockID.getLocalID()));
       if (kData == null) {
-        throw new StorageContainerException("Unable to find the block." +
-            blockID, NO_SUCH_BLOCK);
+        throw new StorageContainerException(NO_SUCH_BLOCK_ERR_MSG + blockID,
+            NO_SUCH_BLOCK);
       }
 
 Review comment:
   Would it make sense to go further and extract this to a method that looks up block by `blockID`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org