[ 
https://issues.apache.org/jira/browse/HBASE-18792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16437304#comment-16437304
 ] 

Sean Busbey commented on HBASE-18792:
-------------------------------------

{code}
+    for (int i = 0; i < strComps.length; ++i) {
+      try {
+        comps[i] = Integer.parseInt((String) strComps[i]);
+      } catch (NumberFormatException e) {
+        comps[i] = strComps[i];
+      }
+    }
{code}

nit: We should use something like commons-lang's {{StringUtils#isNumeric}} to 
check this so that we're not relying on exceptions for control flow. on the 
other hand, this is a standard Java idiom so no big deal if we keep it.

> hbase-2 needs to defend against hbck operations
> -----------------------------------------------
>
>                 Key: HBASE-18792
>                 URL: https://issues.apache.org/jira/browse/HBASE-18792
>             Project: HBase
>          Issue Type: Task
>          Components: hbck
>            Reporter: stack
>            Assignee: Umesh Agashe
>            Priority: Blocker
>             Fix For: 2.0.0
>
>         Attachments: hbase-18792.master.001.patch
>
>
> hbck needs updating to run against hbase2. Meantime, if an hbck from hbase1 
> is run against hbck2, it may do damage. hbase2 should defend itself against 
> hbck1 ops.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to