hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shengjie Min <shengjie....@gmail.com>
Subject How to make sure HBase Java client is using the hbase-site.xml
Date Sun, 25 Aug 2013 02:03:49 GMT
Versions: Hadoop: 2.0.0-cdh4.3.1
HBase: 0.94.6-cdh4.3.1

I am running cloudera quick start vm, Here is my little remote HBase Java
client(HbaseClient.java), all it does is:

public static void main(String[] args) throws IOException {
    Configuration config = HBaseConfiguration.create();
    HTable table = new HTable(config, "s1");

When I run my java client, I get this error:

log4j:WARN No appenders could be found for logger
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
for more info.
2013-08-25 00:01:56.684 java[39082:1703] Unable to load realm info
from SCDynamicStore
Exception in thread "main"
org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to
find region for s1,,99999999999999 after 10 tries.
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:980)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:885)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:987)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:889)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:846)
    at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:271)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:211)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:170)
    at com.***************.api.HBaseClient.main(HBaseClient.java:24)

I debugged through the code, it's hard to find whether the client is using
my hbase-site.xml in resources folder or not. I even put wrong format
content in hbase-site.xml, Java client is getting the same error. So I
think it's not using it. Isn't resources folder part of the CLASSPATH? Is
there any way to check if the hbase-site.xml gets used, if not used, how to
get my client to use it.

[image: Inline images 1]

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message