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

Nitay Joffe commented on HBASE-1145:
------------------------------------

The conf.get(MASTER_ADDRESS) is only for backwards compatibility. It's used in 
the master code when trying to figure out what its hostname/port is. It 
overrides the rest of the options, but is also optional. The line with hostname 
got deleted for some reason, I'll put it back in the next version. The code for 
finding out master's hostname/port should look like this:

{code}
String addressStr = conf.get(MASTER_ADDRESS);
if (addressStr == null) {
  addressStr = conf.get("hbase.master.hostname");
  if (addressStr == null) {
    addressStr = InetAddress.getLocalHost().getCanonicalHostName();
  }
  addressStr += ":";
  addressStr += conf.get("hbase.master.port", 
Integer.toString(DEFAULT_MASTER_PORT));
}
{code}

Will fix distributed property name.

Will fix final ZooKeeperWrapper.

The patches ZK jar is needed. Essentially we just need to make sure there is 
always at least one server.X line in conf/zoo.cfg for things to work right. In 
order to do that, we want to update the template to use the 
"hbase.master.hostname" property. This is why this issue depends on HBASE-1204.

> Ensure that there is only 1 Master with Zookeeper
> -------------------------------------------------
>
>                 Key: HBASE-1145
>                 URL: https://issues.apache.org/jira/browse/HBASE-1145
>             Project: Hadoop HBase
>          Issue Type: Sub-task
>            Reporter: Jean-Daniel Cryans
>            Assignee: Nitay Joffe
>         Attachments: hbase-1145.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to