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

Ted Yu commented on HBASE-11405:
--------------------------------

{code}
+      HBCK_LOCK_PATH = new Path(new Path(FSUtils.getRootDir(getConf()), 
+          HConstants.HBASE_TEMP_DIRECTORY), BALANCER_LOCK_FILE);
{code}
The lock file is used by hbck. Should the name of lock file reflect this ?
{code}
+      // Make sure tmp dir exists, if not create it
+      fs.mkdirs(new Path(FSUtils.getRootDir(getConf()), 
HConstants.HBASE_TEMP_DIRECTORY));
{code}
Check the return value from mkdirs().
{code}
+      setRetCode(-1);
+      LOG.info("Another balancer is running - Exiting this instance");
{code}
log level should be error above.



> Multiple invocations of hbck in parallel disables balancer permanently 
> -----------------------------------------------------------------------
>
>                 Key: HBASE-11405
>                 URL: https://issues.apache.org/jira/browse/HBASE-11405
>             Project: HBase
>          Issue Type: Bug
>          Components: Balancer, hbck
>    Affects Versions: 0.99.0
>            Reporter: bharath v
>         Attachments: HBASE-11405-trunk.patch
>
>
> This is because of the following piece of code in hbck
> {code:borderStyle=solid}
>   boolean oldBalancer = admin.setBalancerRunning(false, true);
>     try {
>       onlineConsistencyRepair();
>     }
>     finally {
>       admin.setBalancerRunning(oldBalancer, false);
>     }
> {code}
> Newer invocations set oldBalancer to false as it was disabled by previous 
> invocations and this disables balancer permanently unless its manually turned 
> on by the user. Easy to reproduce, just run hbck 100 times in a loop in 2 
> different sessions and you can see that balancer is set to false in the 
> HMaster logs.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to