[
https://issues.apache.org/jira/browse/HBASE-21072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16590361#comment-16590361
]
Reid Chan commented on HBASE-21072:
-----------------------------------
LGTM overall.
nit.
Use 2 indents instead of 4.
{code}
/**
* @return Empty unless you call {@link #call()}
*/
{code}
To be more precisely, return Null.
{code}
out.writeBytes(" Written by an hbase-2.x Master to block an " +
"attempt by an hbase-1.x HBCK tool making modification to state. " +
"See 'HBCK must match HBase server version' in the hbase
refguide.");
{code}
This info is good, but i doubt user will try to read it. Can we throw an
exception like following when a hbase1.x user tries to run fsck against
hbase2.x cluster.
{code}
Pair<Path, FSDataOutputStream> pair =
checkAndMarkRunningHbck(getConf(),
this.lockFileRetryCounterFactory.create());
HBCK_LOCK_PATH = pair.getFirst();
this.hbckOutFd = pair.getSecond();
if (hbckOutFd == null) {
setRetCode(-1);
LOG.error("Another instance of hbck is fixing HBase, exiting this
instance. " +
"[If you are sure no other instance is running, delete the lock
file " +
HBCK_LOCK_PATH + " and rerun the tool]");
throw new IOException("Duplicate hbck - Abort");
}
{code}
> 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
> Attachments: HBASE-21072.branch-2.0.001.patch,
> HBASE-21072.branch-2.0.002.patch
>
>
> [~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)