Umeshkumar9414 commented on code in PR #6638:
URL: https://github.com/apache/hbase/pull/6638#discussion_r1933331442


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java:
##########
@@ -636,8 +636,16 @@ public static Put makePutFromRegionInfo(RegionInfo 
regionInfo) throws IOExceptio
    * @throws IllegalArgumentException when the provided RegionInfo is not the 
default replica.
    */
   public static Put makePutFromRegionInfo(RegionInfo regionInfo, long ts) 
throws IOException {
-    return addRegionInfo(new 
Put(CatalogFamilyFormat.getMetaKeyForRegion(regionInfo), ts),
-      regionInfo);
+    byte[] metaKeyForRegion = 
CatalogFamilyFormat.getMetaKeyForRegion(regionInfo);
+    try {
+      Put put = new Put(metaKeyForRegion, ts);
+      return addRegionInfo(put, regionInfo);
+    } catch (IllegalArgumentException ex) {

Review Comment:
   Ohh it is IllegalArgumentException not IllegalArgumentIOException. It is an 
unchecked exception. I wonder why they used unchecked one. And there are not 
many places where we handled IllegalArgumentException.
   



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to