[
https://issues.apache.org/jira/browse/HBASE-19793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16325453#comment-16325453
]
Duo Zhang commented on HBASE-19793:
-----------------------------------
The problem is that, we will set clusterId again in HRegionServer.run... This
is still a bit confusing...
Let me prepare a patch. Maybe we could introduce a generateOrGetClusterId
method in HRegionServer which returns a ClusterId and it will be called in the
constructor of HRegionServer right after we initialized the ZKWatcher and
FileSystem. In HRegionServer it will load the ClusterId from the zookeeper and
if it has not been set yet we will wait sometime before aborting. For HMaster,
it will try to generate the clusterId.
Will be back later.
> Move the cluster id initialization to the very beginning
> --------------------------------------------------------
>
> Key: HBASE-19793
> URL: https://issues.apache.org/jira/browse/HBASE-19793
> Project: HBase
> Issue Type: Sub-task
> Reporter: Duo Zhang
> Fix For: 2.0.0-beta-1
>
>
> Both ZooKeeper and hadoop FileSystem can do fencing, that means, if two
> processes try to create one file, only one of them can succeed. So I think we
> can move the initialization of ClusterId to the very beginning instead of
> only allow active master to do it.
> This may helps us solve the complicated dependency issue.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)