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

stack commented on HBASE-21072:
-------------------------------

Took a look at this one.  The code for putting the lock in place is still 
around inside HBaseFsck, the name of the HBCK class in hbase1 -- see 
FileLockCallable. Tough part is that the hbck1 tool has been made to work 
against hbase2; it can read state in hbase2, just not set it. The help output 
is good on messaging this and in the refguide we have text that says the below:

{code}
HBCK must match HBase server version
You must not use an HBase 1.x version of HBCK against an HBase 2.0+ cluster. 
HBCK is strongly tied to the HBase server version. Using the HBCK tool from an 
earlier release against an HBase 2.0+ cluster will destructively alter said 
cluster in unrecoverable ways.

As of HBase 2.0, HBCK is a read-only tool that can report the status of some 
non-public system internals. You should not rely on the format nor content of 
these internals to remain consistent across HBase releases.
{code}

So, we should let hbase2 versions of hbck1 run and block hbase1 versions of 
hbck1. Let me have hbase2 hbck1 tools put the lock in a different place. That 
should do it.

> Block out HBCK1 in hbase2
> -------------------------
>
>                 Key: HBASE-21072
>                 URL: https://issues.apache.org/jira/browse/HBASE-21072
>             Project: HBase
>          Issue Type: Sub-task
>          Components: hbck
>    Affects Versions: 2.0.1
>            Reporter: stack
>            Assignee: stack
>            Priority: Major
>
> [~busbey] left a note in the parent issue that I only just read which has a 
> prescription for how we might block hbck1 from running against an hbase-2.x 
> (hbck1 could damage a hbase-2....Its disabled in hbase-2 but an errant hbck1 
> from an hbase-1.x install might run).
> Here is quote from parent issue:
> {code}
> I was idly thinking about how to stop HBase v1 HBCK. Thanks to HBASE-11405, 
> we know that all HBase 1.y.z hbck instances should refuse to run if there's a 
> lock file at '/hbase/hbase-hbck.lock' (given defaults). How about HBase v2 
> places that file permanently in place and replace the contents (usually just 
> an IP address) with a note about how you must not run HBase v1 HBCK against 
> the cluster?
> {code}
> There is also the below:
> {code}
> We could pick another location for locking on HBase version 2 and start 
> building in a version check of some kind?
> {code}
> ... to which I'd answer, lets see. hbck2 is a different beast. It asks the 
> master to do stuff. It doesn't do it itself, as hbck1 did. So no need of a 
> lock/version.



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

Reply via email to