You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/11/22 16:22:38 UTC

[GitHub] [hbase] saintstack commented on a change in pull request #867: HBASE-23117: Bad enum in hbase:meta info:state column can fail loadMeta and stop startup

saintstack commented on a change in pull request #867: HBASE-23117: Bad enum in hbase:meta info:state column can fail loadMeta and stop startup
URL: https://github.com/apache/hbase/pull/867#discussion_r349680625
 
 

 ##########
 File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java
 ##########
 @@ -352,8 +352,16 @@ public static State getRegionState(final Result r, int replicaId) {
     if (cell == null || cell.getValueLength() == 0) {
       return null;
     }
-    return State.valueOf(Bytes.toString(cell.getValueArray(), cell.getValueOffset(),
-        cell.getValueLength()));
+
+    String state = Bytes.toString(cell.getValueArray(), cell.getValueOffset(),
+        cell.getValueLength());
+    try {
+      return State.valueOf(state);
+    }
+    catch (IllegalArgumentException e) {
+      LOG.debug("BAD value {} in hbase:meta info:state column", state);
 
 Review comment:
   What @wchevreuil  said

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