Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - Remote java client hang


Copy link to this message
-
Re: Remote java client hang
Ted Yu 2013-12-07, 07:55
Did you specify hbase.rootdir ?

Cheers
On Sat, Dec 7, 2013 at 12:27 AM, Rural Hunter <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I set up a hbase cluster(hbase-0.96.0-hadoop2 + hadoop-2.2.0) with 1
> master and 3 slaves. Everything seems fine when I use hbase shell on the
> master. I could create/scan tables. But when I tried to run a test Java
> class on the remote server, it just hung up. This is the simple program:
>         Configuration myConf = HBaseConfiguration.create();
>         myConf.set("hbase.zookeeper.quorum",SERVER_ADDR);
>         HTableInterface testTable = new HTable(myConf, "test");
>         Get g = new Get(Bytes.toBytes("row1"));
>         Result r = testTable.get(g);
>         System.out.println(r.getRow());
>         testTable.close();
>
> There is no hadoop/hbase installation and hbase-site.xml on the client. I
> just put needed jars in classpath. I set the log level to debug and I found
> these:
>
> --- exec-maven-plugin:1.2.1:exec (default-cli) @ tests ---
> lib.MutableMetricsFactory field org.apache.hadoop.metrics2.lib.MutableRate
> org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginSuccess
> with annotation @org.apache.hadoop.metrics2.annotation.Metric(valueName=Time,
> about=, value=[Rate of successful kerberos logins and latency
> (milliseconds)], always=false, type=DEFAULT, sampleName=Ops)
> lib.MutableMetricsFactory field org.apache.hadoop.metrics2.lib.MutableRate
> org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginFailure
> with annotation @org.apache.hadoop.metrics2.annotation.Metric(valueName=Time,
> about=, value=[Rate of failed kerberos logins and latency (milliseconds)],
> always=false, type=DEFAULT, sampleName=Ops)
> impl.MetricsSystemImpl UgiMetrics, User and group related metrics
> util.KerberosName Kerberos krb5 configuration not found, setting default
> realm to empty
> security.Groups  Creating new Groups object
> util.NativeCodeLoader Trying to load the custom-built native-hadoop
> library...
> util.NativeCodeLoader Failed to load native-hadoop with error: java.lang.UnsatisfiedLinkError:
> no hadoop in java.library.path
> util.NativeCodeLoader java.library.path=C:\Program
> Files\Java\jdk1.7\bin;C:\Windows\Sun\Java\bin;C:\
> Windows\system32;C:\Windows;C:\Program Files (x86)\Common
> Files\NetSarang;C:\Windows\system32;C:\Windows;C:\
> Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
> Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth
> Software\syswow64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program
> Files\TortoiseGit\bin;C:\Program Files\TortoiseHg\;.
> [WARN] util.NativeCodeLoader Unable to load native-hadoop library for your
> platform... using builtin-java classes where applicable
> security.JniBasedUnixGroupsMappingWithFallback Falling back to shell based
> security.JniBasedUnixGroupsMappingWithFallback Group mapping
> impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping
> security.Groups Group mapping impl=org.apache.hadoop.security.
> JniBasedUnixGroupsMappingWithFallback; cacheTimeout=300000
> security.UserGroupInformation hadoop login
> security.UserGroupInformation hadoop login commit
> security.UserGroupInformation using local user:NTUserPrincipal: ruralhunter
> security.UserGroupInformation UGI loginUser:ruralhunter (auth:SIMPLE)
> util.Shell Failed to detect a valid hadoop home directory
> java.io.IOException: HADOOP_HOME or hadoop.home.dir are not set.
>     at org.apache.hadoop.util.Shell.checkHadoopHome(Shell.java:225)
>     at org.apache.hadoop.util.Shell.<clinit>(Shell.java:250)
>     at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:76)
>     at org.apache.hadoop.conf.Configuration.getStrings(
> Configuration.java:1514)
>     at org.apache.hadoop.hbase.zookeeper.ZKConfig.
> makeZKProps(ZKConfig.java:113)
>     at org.apache.hadoop.hbase.zookeeper.ZKConfig.
> getZKQuorumServersString(ZKConfig.java:265)
>     at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<