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 11:34:12 UTC
[GitHub] [hbase] wchevreuil commented on a change in pull request #867:
HBASE-23117: Bad enum in hbase:meta info:state column can fail loadMeta and
stop startup
wchevreuil 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_r349553189
##########
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:
Can we also log the specific region encoded name? Also, as it's an exceptional situation, I think log level should be WARN. We could also give some tip for fixing it using hbck2 _setRegionStateInMeta_ command?
----------------------------------------------------------------
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