You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Vinay Kashyap <vi...@ymail.com> on 2014/02/11 11:08:04 UTC

How to Read hbase server side properties

Hi all,<br/>Is there any API to read server side properties which are set in hbase-site.xml..?? I did not get any information in the net.<br/><br/>Thanks and regards<br/>Vinay kashyap

Re: How to Read hbase server side properties

Posted by Matteo Bertozzi <th...@gmail.com>.
HBaseConfiguration.create() loads the configuration from the hbase-site.xml
in the classpath.
If you have multiple hbase-site.xml you should put the one that you want to
use in the classpath.

The client hbase-site.xml doesn't need all the properties of the Master or
the Region Servers.
HBaseAdmin and all the other hbase classes are using
HBaseConfiguration.create() so there is no difference.
You must have the hbase-site.xml that you want to use in the classpath.

If you want to know the configuration that each server is running, you can
fetch it from the web-ui.

Matteo



On Wed, Feb 12, 2014 at 5:32 PM, Vinay Kashyap <vi...@ymail.com>wrote:

> HbaseConfiguration.create() provides even the server side properties as
> wel..?? <br/>For eg., when using cloudera hadoop, I configure extra
> properties in region server safety valve and use in my hbase server. I want
> to obtain the value of one of the properties which is configured in the
> safety valve in my code.. Will I get those propeties from
> HBaseConfiguration.create(). I guess it is only to read and connect to the
> HBase server at client side..<br/><br/>I found another API,
> hBaseAdmin.getConfiguration(). The javadoc says it provides Configuration
> used by this instance. Do you guys think this API helps..?? I am yet to try
> this out..<br/><br/>Thanks and regards<br/>Vinay Kashyap

Re: How to Read hbase server side properties

Posted by Ted Yu <yu...@gmail.com>.
If you use this ctor of HBaseAdmin:

  public HBaseAdmin(Configuration c)

  throws MasterNotRunningException, ZooKeeperConnectionException {

    this.conf = HBaseConfiguration.create(c);

HBaseAdmin would have an instance of HBaseConfiguration created as
described previously.

And getConfiguration() would just return this instance:

  public Configuration getConfiguration() {

    return this.conf;

  }


Can you tell us what safety valve(s) your client tries to obtain ?


On Wed, Feb 12, 2014 at 9:32 AM, Vinay Kashyap <vi...@ymail.com>wrote:

> HbaseConfiguration.create() provides even the server side properties as
> wel..?? <br/>For eg., when using cloudera hadoop, I configure extra
> properties in region server safety valve and use in my hbase server. I want
> to obtain the value of one of the properties which is configured in the
> safety valve in my code.. Will I get those propeties from
> HBaseConfiguration.create(). I guess it is only to read and connect to the
> HBase server at client side..<br/><br/>I found another API,
> hBaseAdmin.getConfiguration(). The javadoc says it provides Configuration
> used by this instance. Do you guys think this API helps..?? I am yet to try
> this out..<br/><br/>Thanks and regards<br/>Vinay Kashyap

Re: How to Read hbase server side properties

Posted by Vinay Kashyap <vi...@ymail.com>.
HbaseConfiguration.create() provides even the server side properties as wel..?? <br/>For eg., when using cloudera hadoop, I configure extra properties in region server safety valve and use in my hbase server. I want to obtain the value of one of the properties which is configured in the safety valve in my code.. Will I get those propeties from HBaseConfiguration.create(). I guess it is only to read and connect to the HBase server at client side..<br/><br/>I found another API, hBaseAdmin.getConfiguration(). The javadoc says it provides Configuration used by this instance. Do you guys think this API helps..?? I am yet to try this out..<br/><br/>Thanks and regards<br/>Vinay Kashyap

Re: How to Read hbase server side properties

Posted by Ted Yu <yu...@gmail.com>.
Minor correction: HBaseConfiguration.create()

This assumes access to hbase-site.xml is provided.


On Tue, Feb 11, 2014 at 8:41 AM, Lukas Nalezenec <
lukas.nalezenec@firma.seznam.cz> wrote:

> How about
> BaseConfiguration.create() in package org.apache.hadoop.hbase?
> Lukas
>
>
> On 11.2.2014 16:39, Vinay Kashyap wrote:
>
>> Hi bharath,<br/>Thanks for the info.. But is there any java API exposed
>> to get same information..??<br/><br/>Thanks and regards<br/>Vinay Kashyap
>>
>
>

Re: How to Read hbase server side properties

Posted by Lukas Nalezenec <lu...@firma.seznam.cz>.
How about
BaseConfiguration.create() in package org.apache.hadoop.hbase?
Lukas

On 11.2.2014 16:39, Vinay Kashyap wrote:
> Hi bharath,<br/>Thanks for the info.. But is there any java API exposed to get same information..??<br/><br/>Thanks and regards<br/>Vinay Kashyap


Re: How to Read hbase server side properties

Posted by Vinay Kashyap <vi...@ymail.com>.
Hi bharath,<br/>Thanks for the info.. But is there any java API exposed to get same information..??<br/><br/>Thanks and regards<br/>Vinay Kashyap

Re: How to Read hbase server side properties

Posted by Bharath Vissapragada <bh...@cloudera.com>.
Hi,

You can do a  "curl <master/RS web ui>:<port>/conf" to get the current
configs that are being used by hbase daemons. You get the output in xml
format.

- Bharath


On Tue, Feb 11, 2014 at 3:38 PM, Vinay Kashyap <vi...@ymail.com>wrote:

> Hi all,<br/>Is there any API to read server side properties which are set
> in hbase-site.xml..?? I did not get any information in the
> net.<br/><br/>Thanks and regards<br/>Vinay kashyap




-- 
Bharath Vissapragada
<http://www.cloudera.com>