hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitay Joffe (JIRA)" <j...@apache.org>
Subject [jira] Created: (HBASE-1204) Ensure there is always at least one server.X line in ZooKeeper conf/zoo.cfg
Date Thu, 19 Feb 2009 00:31:03 GMT
Ensure there is always at least one server.X line in ZooKeeper conf/zoo.cfg
---------------------------------------------------------------------------

                 Key: HBASE-1204
                 URL: https://issues.apache.org/jira/browse/HBASE-1204
             Project: Hadoop HBase
          Issue Type: Improvement
            Reporter: Nitay Joffe


This is needed so that we can get rid of the "hbase.master" property from the configuration
XML.

>From HBASE-1145:

There is a bit of an issue regarding getting rid of the "hbase.master" property in hbase-site.xml.
Currently, anybody in HBase needing ZooKeeper parses the server.X lines out of conf/zoo.cfg
to know how to connect to ZooKeeper. If there are no server.X lines, it means we are running
a single instance ZooKeeper on the master server. To find that server, we use the "hbase.master"
property in hbase-site.xml.

After discussing it with Andrew Purtell and Michael Stack, we came up with the following:

We have three cases:
1) "local" mode. All servers/clients are on localhost.
2) Distributed operation with single instance ZooKeeper running on master host.
3) Distributed operation with distributed ZooKeeper running.

To fix these cases (1 and 2) and allow us to remove the "hbase.master" property from hbase-site.xml,
we need to make sure there is _always_ a server.X line with the master's address in the zoo.cfg.
Even when you're running a single instance ZooKeeper on the master server, there should be
a single server.X line with the master's address.

To avoid adding a lot of configuration headache on the user, we want to have the default conf/zoo.cfg
have a sensible default for the single server master hostname case. We suggest shipping a
new ZooKeeper jar with ZOOKEEPER-279 patched in, and using the variable substitution to inject
the master hostname into zoo.cfg. For example, our new zoo.cfg would look something like:


{code}
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=${hbase.tmp.dir}/zookeeper
# the port at which the clients will connect
clientPort=2181 

server.0=${master.address.hostname}:2888:3888
{code}


The "master.address.hostname" is a new property being added to the hbase-site.xml during this
period while we transition users to ZooKeeper. If the property is not set, we will use gethostname()
to fill in the variable and produce copious warning messages that it may not work and the
user should either fill in that variable in hbase-site.xml, or edit zoo.cfg by hand.

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


Mime
View raw message