访问mapR-DB表

时间:2017-06-08 15:19:44

标签: hadoop jar mapr

我在MapR fs 5.2.0上工作。我在尝试访问mapr-DB表时遇到问题。

这是我的代码:

Configuration configuration = HBaseConfiguration.create();
configuration.addResource("hbase-site.xml");    
HTable table = new HTable(configuration,"/user/mapr/table1");

我的罐子是:

  • commons-collections-3.2.2.jar
  • 公地配置-1.6.jar
  • commons-lang-2.6.jar
  • commons-logging-1.2.jar
  • 番石榴12.0.1.jar
  • 的hadoop-AUTH-2.7.0-MAPR-1602.jar
  • Hadoop的共2.7.0-MAPR-1602.jar
  • HBase的客户端-1.1.1- MAPR-1602.jar
  • HBase的-共1.1.1- MAPR-1602.jar
  • HBase的 - 协议 - 1.1.1- MAPR-1602.jar
  • 蜂房-EXEC-0.11.0.jar
  • 蜂房JDBC-0.11.0.jar
  • 蜂房metastore-0.11.0.jar

  • 蜂房服务0.11.0.jar

  • 的HttpClient-4.5.2.jar
  • httpmime-4.5.2.jar
  • JS​​ON-20080701.jar
  • libfb303-0.9.0.jar
  • libthrift-0.9.0.jar
  • 的log4j-1.2.17.jar
  • maprfs-5.2.0-mapr.jar
  • MAPR-HBase的-5.2.0-mapr.jar
  • 的protobuf-java的3.1.0.jar
  • SLF4J-API-1.7.7.jar
  • SLF4J-log4j12-1.6.1.jar
  • 动物园管理员-3,4,5- MAPR-1406.jar

我得到的错误是:

08/06/2017 17:15:57 DEBUG CLDBRpcCommonUtils:133 - init
08/06/2017 17:15:57 DEBUG JVMProperties:49 - Setting JVM property zookeeper.saslprovider to com.mapr.security.simplesasl.SimpleSaslProvider
08/06/2017 17:15:57 DEBUG JVMProperties:49 - Setting JVM property zookeeper.sasl.clientconfig to Client_simple
08/06/2017 17:15:57 DEBUG JVMProperties:49 - Setting JVM property java.security.auth.login.config to /opt/mapr/conf/mapr.login.conf
08/06/2017 17:15:57 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties
08/06/2017 17:15:57 DEBUG Shell:321 - Failed to detect a valid hadoop home directory
08/06/2017 17:15:58 DEBUG Shell:397 - setsid exited with exit code 0
08/06/2017 17:15:58 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties
08/06/2017 17:15:58 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties
08/06/2017 17:15:58 DEBUG MutableMetricsFactory:42 - field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginSuccess with annotation @org.apache.hadoop.metrics2.annotation.Metric(about=, sampleName=Ops, always=false, type=DEFAULT, valueName=Time, value=[Rate of successful kerberos logins and latency (milliseconds)])
08/06/2017 17:15:58 DEBUG MutableMetricsFactory:42 - field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginFailure with annotation @org.apache.hadoop.metrics2.annotation.Metric(about=, sampleName=Ops, always=false, type=DEFAULT, valueName=Time, value=[Rate of failed kerberos logins and latency (milliseconds)])
08/06/2017 17:15:58 DEBUG MutableMetricsFactory:42 - field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.getGroups with annotation @org.apache.hadoop.metrics2.annotation.Metric(about=, sampleName=Ops, always=false, type=DEFAULT, valueName=Time, value=[GetGroups])
08/06/2017 17:15:58 DEBUG MetricsSystemImpl:232 - UgiMetrics, User and group related metrics
08/06/2017 17:15:58 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties
08/06/2017 17:15:58 DEBUG UserGroupInformation:211 - HADOOP_SECURITY_AUTHENTICATION is set to: SIMPLE
08/06/2017 17:15:58 DEBUG UserGroupInformation:242 - Login configuration entry is hadoop_simple
08/06/2017 17:15:58 DEBUG UserGroupInformation:337 - authenticationMethod from JAAS configuration:SIMPLE
08/06/2017 17:15:58 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties
08/06/2017 17:15:58 DEBUG Groups:301 -  Creating new Groups object
08/06/2017 17:15:58 DEBUG NativeCodeLoader:46 - Trying to load the custom-built native-hadoop library...
08/06/2017 17:15:58 DEBUG NativeCodeLoader:55 - Failed to load native-hadoop with error: java.lang.UnsatisfiedLinkError: no hadoop in java.library.path
08/06/2017 17:15:58 DEBUG NativeCodeLoader:56 - java.library.path=/opt/mapr/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
08/06/2017 17:15:58 WARN  NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
08/06/2017 17:15:58 DEBUG PerformanceAdvisory:41 - Falling back to shell based
08/06/2017 17:15:58 DEBUG JniBasedUnixGroupsMappingWithFallback:45 - Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping
08/06/2017 17:15:58 DEBUG Groups:112 - Group mapping impl=org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback; cacheTimeout=300000; warningDeltaMs=5000
08/06/2017 17:15:58 DEBUG HadoopLoginModule:210 - Priority principal search list is [class javax.security.auth.kerberos.KerberosPrincipal]
08/06/2017 17:15:58 DEBUG HadoopLoginModule:212 - Additional principal search list is [class com.sun.security.auth.UnixPrincipal]
08/06/2017 17:15:58 DEBUG HadoopLoginModule:222 - hadoop login
08/06/2017 17:15:58 DEBUG HadoopLoginModule:132 - hadoop login commit
08/06/2017 17:15:58 DEBUG RpcAuthRegistry:84 - Added SIMPLE to registry.
08/06/2017 17:15:58 DEBUG RpcAuthRegistry:84 - Added KERBEROS to registry.
08/06/2017 17:15:58 DEBUG RpcAuthRegistry:84 - Added TOKEN to registry.
08/06/2017 17:15:58 DEBUG RpcAuthRegistry:84 - Added FAKE to registry.
08/06/2017 17:15:58 DEBUG UserGroupInformation:768 - Found no authentication principals in subject. Simple?
08/06/2017 17:15:58 DEBUG UserGroupInformation:754 - UGI loginUser:mapr (auth:SIMPLE)
08/06/2017 17:15:58 INFO  ConnectionFactory:272 - ConnectionFactory receives mapr.hbase.default.db(maprdb), set clusterType(MAPR_ONLY), hbase_admin_connect_at_construction(false)
08/06/2017 17:15:58 INFO  ConnectionFactory:277 - ConnectionFactory creates a maprdb connection!
Is Master running? true
08/06/2017 17:15:58 DEBUG MapRHTable:87 - Init table /user/mapr/table1
08/06/2017 17:15:58 DEBUG MapRLoginHttpsClient:114 - Entering authenticate if needed.
08/06/2017 17:15:58 DEBUG MapRLoginHttpsClient:251 - Kerberos not configured for this cluster.
08/06/2017 17:15:58 DEBUG MapRLoginHttpsClient:131 - security appears to be off
08/06/2017 17:15:58 DEBUG MapRFileSystem:651 - User Info object initialized for user mapr with user ID 5000
08/06/2017 17:15:58 DEBUG Inode:25 - >Inode GetAttr: table: /user/mapr/table1, size: 2, chunksize: 0, fid: 2066.53132.14923640
Exception : java.lang.RuntimeException: Error occurred while instantiating com.mapr.fs.hbase.HTableImpl11.
==> java.lang.NoSuchMethodError: com.mapr.fs.proto.Dbserver$ColumnFamilyScanResponse.makeExtensionsImmutable()V.
java.io.IOException: java.lang.RuntimeException: Error occurred while instantiating com.mapr.fs.hbase.HTableImpl11.
==> java.lang.NoSuchMethodError: com.mapr.fs.proto.Dbserver$ColumnFamilyScanResponse.makeExtensionsImmutable()V.
        at org.apache.hadoop.hbase.client.mapr.GenericHFactory.handleIOException(GenericHFactory.java:62)
        at org.apache.hadoop.hbase.client.HTable.initIfMapRTableImpl(HTable.java:507)
        at org.apache.hadoop.hbase.client.HTable.initIfMapRTable(HTable.java:462)
        at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:221)
        at com.mapr.fs.hbase.MapRClusterConnectionImpl.getTable(MapRClusterConnectionImpl.java:174)
        at com.mapr.fs.hbase.MapRClusterConnectionImpl.getTable(MapRClusterConnectionImpl.java:169)
        at Main.pocMapr(Main.java:115)
        at Main.main(Main.java:100)
Caused by: java.lang.RuntimeException: Error occurred while instantiating com.mapr.fs.hbase.HTableImpl11.
==> java.lang.NoSuchMethodError: com.mapr.fs.proto.Dbserver$ColumnFamilyScanResponse.makeExtensionsImmutable()V.
        at org.apache.hadoop.hbase.client.mapr.GenericHFactory.getImplementorInstance(GenericHFactory.java:40)
        at org.apache.hadoop.hbase.client.HTable.createMapRTable(HTable.java:537)
        at org.apache.hadoop.hbase.client.HTable.initIfMapRTableImpl(HTable.java:504)
        ... 6 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.apache.hadoop.hbase.client.mapr.GenericHFactory.getImplementorInstance(GenericHFactory.java:37)
        ... 8 more
Caused by: java.lang.NoSuchMethodError: com.mapr.fs.proto.Dbserver$ColumnFamilyScanResponse.makeExtensionsImmutable()V
        at com.mapr.fs.proto.Dbserver$ColumnFamilyScanResponse.<init>(Dbserver.java)
        at com.mapr.fs.proto.Dbserver$ColumnFamilyScanResponse.<init>(Dbserver.java)
        at com.mapr.fs.proto.Dbserver$ColumnFamilyScanResponse$1.parsePartialFrom(Dbserver.java)
        at com.mapr.fs.proto.Dbserver$ColumnFamilyScanResponse$1.parsePartialFrom(Dbserver.java)
        at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:139)
        at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:173)
        at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:185)
        at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:190)
        at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
        at com.mapr.fs.proto.Dbserver$ColumnFamilyScanResponse.parseFrom(Dbserver.java)
        at com.mapr.fs.MapRHTable.refreshSchema(MapRHTable.java:649)
        at com.mapr.fs.MapRHTable.init(MapRHTable.java:99)
        at com.mapr.fs.hbase.HTableImpl.<init>(HTableImpl.java:94)
        at com.mapr.fs.hbase.HTableImpl11.<init>(HTableImpl11.java:57)
        ... 13 more

很明显,缺少一个功能。但我没找到合适的罐子。

有人可以帮忙吗?

感谢

2 个答案:

答案 0 :(得分:0)

你能告诉我你正在尝试用maprdb表做什么,你试图扫描现有的表吗?

答案 1 :(得分:0)

Solved !

It was the hive-exec.jar which was problematic, i've deleted it.