Whirr
  1. Whirr
  2. WHIRR-339

Allow to specify hbase-site.xml properties through cluster configuration file

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.6.0
    • Component/s: service/hbase
    • Labels:
      None

      Description

      Currently the hbase-site.xml configuration is hardcoded in the configure(_cdh)_hbase.sh script. This patch adds dynamic generation of hbase-site.xml, modelled after what is done for hadoop-(common|mapred|hdfs)-site.xml.

      The user is able to specify custom properties in their cluster configuration, by prefixing them with 'hbase-site.'

      Default config is in whirr-hbase-default.properties. Compared to what was in configure_hbase.sh before, I dropped the setting of "hbase-site.hbase.client.retries.number=100" because I'm not sure we should divert from the HBase default there.

      I left in the passing of the ZOOKEEPER_QUORUM to the configure script, as I figured people using custom scripts might still want to have it (there's a PORT variable passed that doesn't seem to be used either).

      On a more general note, this patch has the same limitations as for Hadoop: running master and regionserver on same node will not work as the configuration will be appended twice to the same file, and running the restserver/thriftserver not together with regionserver or master will fail due to missing hbase-site.xml. Solving this is a topic of its own.

      1. WHIRR-339.patch
        12 kB
        Bruno Dumon
      2. WHIRR-339.patch
        11 kB
        Bruno Dumon

        Activity

        Hide
        Bruno Dumon added a comment -
        Show
        Bruno Dumon added a comment - Adding patch, corresponds to the changes at https://github.com/bdumon/whirr/commit/948b3aa08c062b24f5c154575cfac451a7cefdad
        Hide
        Tom White added a comment -

        This looks good - thanks for working on it.

        > I dropped the setting of "hbase-site.hbase.client.retries.number=100" because I'm not sure we should divert from the HBase default there.

        hbase-site.hbase.client.retries.number was increased from the default due to problems we were having as described in WHIRR-314. So I think we should keep it in the absence of a better solution.

        Have you managed to run the HBase integration tests with this change?

        > Solving this is a topic of its own.

        Worth opening a JIRA for this?

        Show
        Tom White added a comment - This looks good - thanks for working on it. > I dropped the setting of "hbase-site.hbase.client.retries.number=100" because I'm not sure we should divert from the HBase default there. hbase-site.hbase.client.retries.number was increased from the default due to problems we were having as described in WHIRR-314 . So I think we should keep it in the absence of a better solution. Have you managed to run the HBase integration tests with this change? > Solving this is a topic of its own. Worth opening a JIRA for this?
        Hide
        Bruno Dumon added a comment -

        I created WHIRR-342 for the issue regarding configuration/role conflicts.

        Meanwhile learned that the patch as-is will break the hbase testcases (because of WHIRR-342), which run a thrift server on a separate node without master/regionserver. The instance-templates in whirr-hbase-test.properties (for both plain/cdh hbase) should be adjusted. The patches on WHIRR-240 & WHIRR-334 actually contain such a change already, so with those applied all should be ok.

        Regarding hbase.client.retries.number: ok, interesting, we should include it then.

        Show
        Bruno Dumon added a comment - I created WHIRR-342 for the issue regarding configuration/role conflicts. Meanwhile learned that the patch as-is will break the hbase testcases (because of WHIRR-342 ), which run a thrift server on a separate node without master/regionserver. The instance-templates in whirr-hbase-test.properties (for both plain/cdh hbase) should be adjusted. The patches on WHIRR-240 & WHIRR-334 actually contain such a change already, so with those applied all should be ok. Regarding hbase.client.retries.number: ok, interesting, we should include it then.
        Hide
        Bruno Dumon added a comment -

        Updated the patch for current trunk. Ran HBase & CDH integration tests successfully.

        Show
        Bruno Dumon added a comment - Updated the patch for current trunk. Ran HBase & CDH integration tests successfully.
        Hide
        Andrei Savu added a comment -

        +1 HBase integration tests also pass on cloudservers.

        Show
        Andrei Savu added a comment - +1 HBase integration tests also pass on cloudservers.
        Hide
        Andrei Savu added a comment -

        I've just committed this. Thanks Bruno!

        Show
        Andrei Savu added a comment - I've just committed this. Thanks Bruno!
        Hide
        Joey Hung added a comment - - edited

        Hi Andrei,

        I setup hbase-site.hbase.zookeeper.property.maxClientCnxns=100 in hbase.ec2.properties.
        After the cluster runs, I check hbase-site.xml in /usr/local/hbase-0.90.4/conf and it does show up the property correctly.
        However, I can only get 10 socket connections from a single hbase client (written in java).

        The rest of connections fails with these messages:
        11/11/06 11:00:40 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=ec2-107-22-76-61.compute-1.amazonaws.com:2181 sessionTimeout=180000 watcher=hconnection
        11/11/06 11:00:40 INFO zookeeper.ClientCnxn: Opening socket connection to server ec2-107-22-76-61.compute-1.amazonaws.com/107.22.76.61:2181
        11/11/06 11:00:40 INFO zookeeper.ClientCnxn: Socket connection established to ec2-107-22-76-61.compute-1.amazonaws.com/107.22.76.61:2181, initiating session
        11/11/06 11:00:41 INFO zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect

        Please help or point me to right forum for this question.

        Show
        Joey Hung added a comment - - edited Hi Andrei, I setup hbase-site.hbase.zookeeper.property.maxClientCnxns=100 in hbase.ec2.properties. After the cluster runs, I check hbase-site.xml in /usr/local/hbase-0.90.4/conf and it does show up the property correctly. However, I can only get 10 socket connections from a single hbase client (written in java). The rest of connections fails with these messages: 11/11/06 11:00:40 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=ec2-107-22-76-61.compute-1.amazonaws.com:2181 sessionTimeout=180000 watcher=hconnection 11/11/06 11:00:40 INFO zookeeper.ClientCnxn: Opening socket connection to server ec2-107-22-76-61.compute-1.amazonaws.com/107.22.76.61:2181 11/11/06 11:00:40 INFO zookeeper.ClientCnxn: Socket connection established to ec2-107-22-76-61.compute-1.amazonaws.com/107.22.76.61:2181, initiating session 11/11/06 11:00:41 INFO zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect Please help or point me to right forum for this question.

          People

          • Assignee:
            Bruno Dumon
            Reporter:
            Bruno Dumon
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development