You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by "John.Bork" <Jo...@target.com> on 2015/05/16 00:30:38 UTC
Ambari View HBase Client
Hi,
I am currently working on an Ambari View that will scan an HBase table on a Hadoop cluster. I am having difficulties initializing the connection to HBase because the HBaseConfiguration is failing to load the "hbase-default.xml" as a resource with the ClassLoader from within the Ambari View Resource Class I implemented. It attempts to do so on this line of the HBaseConfiguration class, version hbase-common-0.98.4.2.2.4.2-2-hadoop2:
Line 102: conf.addResource("hbase-default.xml");
Which gets loaded in the Configuration class on this line:
Line 2218: return classLoader.getResource(name);
Where classLoader is defined:
Line 660: classLoader = Thread.currentThread().getContextClassLoader();
Or
Line 662: classLoader = Configuration.class.getClassLoader();
I tried adding hbase-default.xml under the resources folder for the Ambari View project, but it did not find it there.
Is there a specific location where I can put hbase-default.xml so that it will be discovered by the classloader of the Ambari View?
How does the fact that the Ambari View runs in a servlet container influence where the ClassLoader checks?
-John Bork
Re: Ambari View HBase Client
Posted by Jeff Sposetti <je...@hortonworks.com>.
I wonder if you are hitting this issue?
https://issues.apache.org/jira/browse/AMBARI-10748
From: "John.Bork" <Jo...@target.com>>
Reply-To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Date: Friday, May 15, 2015 at 6:30 PM
To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Subject: Ambari View HBase Client
Hi,
I am currently working on an Ambari View that will scan an HBase table on a Hadoop cluster. I am having difficulties initializing the connection to HBase because the HBaseConfiguration is failing to load the "hbase-default.xml" as a resource with the ClassLoader from within the Ambari View Resource Class I implemented. It attempts to do so on this line of the HBaseConfiguration class, version hbase-common-0.98.4.2.2.4.2-2-hadoop2:
Line 102: conf.addResource("hbase-default.xml");
Which gets loaded in the Configuration class on this line:
Line 2218: return classLoader.getResource(name);
Where classLoader is defined:
Line 660: classLoader = Thread.currentThread().getContextClassLoader();
Or
Line 662: classLoader = Configuration.class.getClassLoader();
I tried adding hbase-default.xml under the resources folder for the Ambari View project, but it did not find it there.
Is there a specific location where I can put hbase-default.xml so that it will be discovered by the classloader of the Ambari View?
How does the fact that the Ambari View runs in a servlet container influence where the ClassLoader checks?
-John Bork