You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by kiran chitturi <ch...@gmail.com> on 2013/09/07 02:50:49 UTC

not able to read configuration value from hbase-site.xml (0.94.7)

Hi,

We were using HBase 0.94.1 and recently tried switching to 0.94.7 version.
Our coprocessor code reads configuration value from hbase-site.xml and it
is working successfully with 0.94.1 version.

When I switched to 0.94.7 version, I start HBase and get this error when
coprocessor gets loaded

Caused by: java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:394)

Coprocessor is trying to read the HBase configuration here and it is not
getting loaded when HBase starts due to NPE.

Is there any particular reason this works in 0.94.1 and not in 0.94.7 ?
Does the configuration loading change between versions ?


Thanks,

-- 
Kiran Chitturi

<http://www.linkedin.com/in/kiranchitturi>

Re: not able to read configuration value from hbase-site.xml (0.94.7)

Posted by kiran chitturi <ch...@gmail.com>.
Thank you Ted for your response.

Please find the stack trace below:

2013-09-07 00:43:59,924 ERROR
> org.apache.hadoop.hbase.coprocessor.CoprocessorHost: Error starting
> coprocessor org.abc.hbase.documents.Coprocessor
> java.io.IOException: Could not initialize
> at org.abc.hbase.documents.Coprocessor.start(Coprocessor.java:76)
>  at
> org.apache.hadoop.hbase.coprocessor.CoprocessorHost$Environment.startup(CoprocessorHost.java:654)
> at
> org.apache.hadoop.hbase.coprocessor.CoprocessorHost.loadInstance(CoprocessorHost.java:312)
>  at
> org.apache.hadoop.hbase.coprocessor.CoprocessorHost.load(CoprocessorHost.java:270)
> at
> org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.loadTableCoprocessors(RegionCoprocessorHost.java:190)
>  at
> org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.<init>(RegionCoprocessorHost.java:154)
> at org.apache.hadoop.hbase.regionserver.HRegion.<init>(HRegion.java:498)
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>  at
> org.apache.hadoop.hbase.regionserver.HRegion.newHRegion(HRegion.java:4135)
> at
> org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4318)
>  at
> org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.openRegion(OpenRegionHandler.java:330)
> at
> org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.process(OpenRegionHandler.java:101)
>  at
> org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:175)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>  at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.abc.hbase.documents.Coprocessor.start(Coprocessor.java:70)
>  ... 18 more


In Coprocessor class line 70, I have the below line

props.put("zk.connect", env.getConfiguration().get("a.zk.connect"));

I have defined the variable 'a.zk.connect' in hbase-site.xml and restarted
HBase. The HBase conf directory is in the classpath when HBase is started.

I am not exactly sure where things are going wrong. Do you guys have any
suggestions ?

Thanks,



On Fri, Sep 6, 2013 at 7:00 PM, Ted Yu <yu...@gmail.com> wrote:

> This might be related: HBASE-1936
>
> Do you mind showing us the full stack trace ?
>
> Thanks
>
>
> On Fri, Sep 6, 2013 at 5:50 PM, kiran chitturi <chitturikiran15@gmail.com
> >wrote:
>
> > Hi,
> >
> > We were using HBase 0.94.1 and recently tried switching to 0.94.7
> version.
> > Our coprocessor code reads configuration value from hbase-site.xml and it
> > is working successfully with 0.94.1 version.
> >
> > When I switched to 0.94.7 version, I start HBase and get this error when
> > coprocessor gets loaded
> >
> > Caused by: java.lang.NullPointerException
> >         at java.util.Hashtable.put(Hashtable.java:394)
> >
> > Coprocessor is trying to read the HBase configuration here and it is not
> > getting loaded when HBase starts due to NPE.
> >
> > Is there any particular reason this works in 0.94.1 and not in 0.94.7 ?
> > Does the configuration loading change between versions ?
> >
> >
> > Thanks,
> >
> > --
> > Kiran Chitturi
> >
> > <http://www.linkedin.com/in/kiranchitturi>
> >
>



-- 
Kiran Chitturi

<http://www.linkedin.com/in/kiranchitturi>

Re: not able to read configuration value from hbase-site.xml (0.94.7)

Posted by Ted Yu <yu...@gmail.com>.
This might be related: HBASE-1936

Do you mind showing us the full stack trace ?

Thanks


On Fri, Sep 6, 2013 at 5:50 PM, kiran chitturi <ch...@gmail.com>wrote:

> Hi,
>
> We were using HBase 0.94.1 and recently tried switching to 0.94.7 version.
> Our coprocessor code reads configuration value from hbase-site.xml and it
> is working successfully with 0.94.1 version.
>
> When I switched to 0.94.7 version, I start HBase and get this error when
> coprocessor gets loaded
>
> Caused by: java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:394)
>
> Coprocessor is trying to read the HBase configuration here and it is not
> getting loaded when HBase starts due to NPE.
>
> Is there any particular reason this works in 0.94.1 and not in 0.94.7 ?
> Does the configuration loading change between versions ?
>
>
> Thanks,
>
> --
> Kiran Chitturi
>
> <http://www.linkedin.com/in/kiranchitturi>
>