4.java.lang.ClassNotFoundException:org.apache.hadoop.crypto. key.KeyProviderTokenIssuer
解决方式:pom.xml中少配置了公共jar包hadoop-commom,在其中增加如下依赖包:
org.apache.hadoop
hadoop-common
2.8.4
或者使用maven自动配置对应的包,我最终使用了maven,简洁的pom.xml配置如下
4.0.0
org.alex
hbasetest
0.0.1-SNAPSHOT
org.apache.maven.plugins
maven-complier-plugin
3.1
1.7
1.7
true
jdk.tools
jdk.tools
1.8
system
${JAVA_HOME}/lib/tools.jar
org.apache.hbase
hbase-client
1.4.9
5. Call to test01/47.106.221.38:34464 failed because org.apache.hadoop.net.ConnectTimeoutException
原因:网络错误,关闭linux防火墙,打开34464端口
6. Exception in thread "main" java.io.IOException: Failed to get result within timeout, timeout=60000ms
成功的创建了表,但是没有返回正确的结果到windows原因:
host文件未配置(搜索到的最多答案,但我的确认配置无误)
时间阀值设置有误,我加入了一下设置后成功运行:
conf.set("hbase.zookeeper.quorum","47.106.221.38");
conf.set("zookeeper.znode.parent", "/hbase");
conf.set("hbase.client.retries.number", "3");
conf.set("hbase.rpc.timeout", "2000");
conf.set("hbase.client.operation.timeout", "3000");
conf.set("hbase.client.scanner.timeout.period", "10000");
提示绑定端口40892错误,打开阿里云服务器的这个端口,再次运行,成功。