You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Arun Allamsetty (JIRA)" <ji...@apache.org> on 2014/07/01 18:44:24 UTC
[jira] [Created] (HBASE-11451) HBase MapReduce job loads
configuration (hbase-site.xml), but actually doesn't use the values read.
Arun Allamsetty created HBASE-11451:
---------------------------------------
Summary: HBase MapReduce job loads configuration (hbase-site.xml), but actually doesn't use the values read.
Key: HBASE-11451
URL: https://issues.apache.org/jira/browse/HBASE-11451
Project: HBase
Issue Type: Bug
Components: mapreduce
Affects Versions: 0.96.1.1
Environment: Linux Debain 7.4 "Wheezy"
Reporter: Arun Allamsetty
I am writing a MapReduce job which reads from (a) HBase table(s). Almost everything works as it is supposed to except the {{Configuration}} class. So I did this,
{code:java}
Configuration config = HBaseConfiguration.create();
GenericOptionsParser parser = new GenericOptionsParser(config, args);
// This should work but is not working.
config.addResource(new Path(parser.getCommandLine().getOptionValue("conf", DEFAULT_HBASE_CONF)));
{code}
When I run the job like this (passing the path to `hbase-site.xml` correctly), I get this error.
{code:java}
14/06/30 23:02:30 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:735)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1075)
14/06/30 23:02:30 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
{code}
But when I add the following two lines, it works like a charm (even though it seems completely ridiculous).
{code:java}
// So these are the workarounds.
config.set("hbase.rootdir", config.get("hbase.rootdir"));
config.set("hbase.zookeeper.quorum", config.get("hbase.zookeeper.quorum"));
{code}
Basically, read the parameters back from the {{Configuration}} object and set them back in the same object, which is bonkers.
I read a bug raised about it [HBASE-11066|https://issues.apache.org/jira/browse/HBASE-11066], but it seems to have been closed citing local configuration problem (I think not). I use CDH 5.0.2 with HBase 0.96.1.1.
I don't know if it is an issue with the Cloudera build or the general one. Please let me know if you need any more details.
--
This message was sent by Atlassian JIRA
(v6.2#6252)