You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Weishung Chung <we...@gmail.com> on 2011/01/26 19:58:18 UTC

pass in customized path to hbase-default.xml and hbase-site.xml

Correct me if i am wrong. If I want to pass in the path of hbase-site.xml to
the HBaseConfiguration,

Create HBaseConfiguration() will still add the default xmls from the
CLASSPATH and will clear them out when I call addResource(String
pathToResource).

Re: pass in customized path to hbase-default.xml and hbase-site.xml

Posted by Weishung Chung <we...@gmail.com>.
Great ! Definitely will check out the package tomorrow ! Thanks :)

On Thu, Jan 27, 2011 at 6:12 PM, tsuna <ts...@gmail.com> wrote:

> Note that if you don't want to deal with XML configuration files, you
> can try asynchbase (https://github.com/stumbleupon/asynchbase).  It's
> an alternative fully asynchronous, non-blocking, thread-safe,
> high-performance HBase client.  You can easily use it to connect to
> multiple clusters, simply by creating different HBaseClient instances.
>  No configuration file needed.  You only need a single HBaseClient
> object per cluster, no matter how many tables you're going to use.
>
> The Javadoc is at http://su.pr/1WGqav
>
> --
> Benoit "tsuna" Sigoure
> Software Engineer @ www.StumbleUpon.com
>

Re: pass in customized path to hbase-default.xml and hbase-site.xml

Posted by tsuna <ts...@gmail.com>.
Note that if you don't want to deal with XML configuration files, you
can try asynchbase (https://github.com/stumbleupon/asynchbase).  It's
an alternative fully asynchronous, non-blocking, thread-safe,
high-performance HBase client.  You can easily use it to connect to
multiple clusters, simply by creating different HBaseClient instances.
 No configuration file needed.  You only need a single HBaseClient
object per cluster, no matter how many tables you're going to use.

The Javadoc is at http://su.pr/1WGqav

-- 
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com

Re: pass in customized path to hbase-default.xml and hbase-site.xml

Posted by Weishung Chung <we...@gmail.com>.
>From what I see in the codes, it appears to me that it loads the defaults
CLASSPATH hbase-default.xml, hbase-site.xml first and then addResource from
the passed in Configuration and overwrite any existing ones.
I will give it a try, thanks :)

On Wed, Jan 26, 2011 at 3:33 PM, Stack <st...@duboce.net> wrote:

> If you try it what do you see?
>
> Its a while since I looked at that code.  From what I remember, there
> is a hard ordering of certain files and then addResource inserts at a
> particular location, probably in front of the defaults loaded from
> CLASSPATH.
>
> St.Ack
>
> On Wed, Jan 26, 2011 at 10:58 AM, Weishung Chung <we...@gmail.com>
> wrote:
> > Correct me if i am wrong. If I want to pass in the path of hbase-site.xml
> to
> > the HBaseConfiguration,
> >
> > Create HBaseConfiguration() will still add the default xmls from the
> > CLASSPATH and will clear them out when I call addResource(String
> > pathToResource).
> >
>

Re: pass in customized path to hbase-default.xml and hbase-site.xml

Posted by Stack <st...@duboce.net>.
If you try it what do you see?

Its a while since I looked at that code.  From what I remember, there
is a hard ordering of certain files and then addResource inserts at a
particular location, probably in front of the defaults loaded from
CLASSPATH.

St.Ack

On Wed, Jan 26, 2011 at 10:58 AM, Weishung Chung <we...@gmail.com> wrote:
> Correct me if i am wrong. If I want to pass in the path of hbase-site.xml to
> the HBaseConfiguration,
>
> Create HBaseConfiguration() will still add the default xmls from the
> CLASSPATH and will clear them out when I call addResource(String
> pathToResource).
>