我在MAPR FS 5.2.0上工作。我在尝试访问MAPR-DB表的同时有问题。
这是我的代码:
Configuration configuration = HBaseConfiguration.create();configuration.addResource("hbase-site.xml"); HTable table = new HTable(configuration,"/user/mapr/table1");我的罐子是:
Hive-Metastore-0.11.0.Jar
Hive-Service-0.11.0.Jar
我遇到的错误是:
08/06/2017 17:15:57 DEBUG CLDBRpcCommonUtils:133 - init08/06/2017 17:15:57 DEBUG JVMProperties:49 - Setting JVM property zookeeper.saslprovider to com.mapr.security.simplesasl.SimpleSaslProvider08/06/2017 17:15:57 DEBUG JVMProperties:49 - Setting JVM property zookeeper.sasl.clientconfig to Client_simple08/06/2017 17:15:57 DEBUG JVMProperties:49 - Setting JVM property java.security.auth.login.config to /opt/mapr/conf/mapr.login.conf08/06/2017 17:15:57 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties08/06/2017 17:15:57 DEBUG Shell:321 - Failed to detect a valid hadoop home directory08/06/2017 17:15:58 DEBUG Shell:397 - setsid exited with exit code 008/06/2017 17:15:58 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties08/06/2017 17:15:58 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties08/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 metrics08/06/2017 17:15:58 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties08/06/2017 17:15:58 DEBUG UserGroupInformation:211 - HADOOP_SECURITY_AUTHENTICATION is set to: SIMPLE08/06/2017 17:15:58 DEBUG UserGroupInformation:242 - Login configuration entry is hadoop_simple08/06/2017 17:15:58 DEBUG UserGroupInformation:337 - authenticationMethod from JAAS configuration:SIMPLE08/06/2017 17:15:58 DEBUG Configuration:2367 - Loaded org.apache.hadoop.conf.CoreDefaultProperties08/06/2017 17:15:58 DEBUG Groups:301 - Creating new Groups object08/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.path08/06/2017 17:15:58 DEBUG NativeCodeLoader:56 - java.library.path=/opt/mapr/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib08/06/2017 17:15:58 WARN NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable08/06/2017 17:15:58 DEBUG PerformanceAdvisory:41 - Falling back to shell based08/06/2017 17:15:58 DEBUG JniBasedUnixGroupsMappingWithFallback:45 - Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping08/06/2017 17:15:58 DEBUG Groups:112 - Group mapping impl=org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback; cacheTimeout=300000; warningDeltaMs=500008/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 login08/06/2017 17:15:58 DEBUG HadoopLoginModule:132 - hadoop login commit08/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? true08/06/2017 17:15:58 DEBUG MapRHTable:87 - Init table /user/mapr/table108/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 off08/06/2017 17:15:58 DEBUG MapRFileSystem:651 - User Info object initialized for user mapr with user ID 500008/06/2017 17:15:58 DEBUG Inode:25 - >Inode GetAttr: table: /user/mapr/table1, size: 2, chunksize: 0, fid: 2066.53132.14923640Exception : 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 moreCaused 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 moreCaused 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显然,缺少功能。但是我没有找到合适的罐子。
谁能帮忙?
谢谢
解决了 !
我已经删除了它是有问题的蜂巢-Exec.jar。
类classAprivatedeffooputs:fooendpublicdefbarputs:barendprivatedefzimputs:zimendprotecteddefdibputs:dibendendA的实例a=A.new测试a.foorescueputs:faila.barrescueputs:faila.zimrescueputs:faila.dibrescueputs:faila.gazrescueputs:fail测试输出failbarfailfailfail.发送测试[:foo,:bar,:zim,:dib,:gaz].each{|m|a.send(m)resc
在railstutorial中,作者为什么选择使用这个(代码list10.25):http://ruby.railstutorial.org/chapters/updating-showing-and-deleting-usersnamespace:dbdodesc"Filldatabasewithsampledata"task:populate=>:environmentdoRake::Task['db:reset'].invokeUser.create!(:name=>"ExampleUser",:email=>"example@railstutorial.org",:passwo
大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje
我有一个包含模块的模型。我想在模块中覆盖模型的访问器方法。例如:classBlah这显然行不通。有什么想法可以实现吗? 最佳答案 您的代码看起来是正确的。我们正在毫无困难地使用这个确切的模式。如果我没记错的话,Rails使用#method_missing作为属性setter,因此您的模块将优先,阻止ActiveRecord的setter。如果您正在使用ActiveSupport::Concern(参见thisblogpost),那么您的实例方法需要进入一个特殊的模块:classBlah
我正在使用Sequel构建一个愿望list系统。我有一个wishlists和itemstable和一个items_wishlists连接表(该名称是续集选择的名称)。items_wishlists表还有一个用于facebookid的额外列(因此我可以存储opengraph操作),这是一个NOTNULL列。我还有Wishlist和Item具有续集many_to_many关联的模型已建立。Wishlist类也有:selectmany_to_many关联的选项设置为select:[:items.*,:items_wishlists__facebook_action_id].有没有一种方法可以
我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test
我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c
我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file
我克隆了一个rails仓库,我现在正尝试捆绑安装背景:OSXElCapitanruby2.2.3p173(2015-08-18修订版51636)[x86_64-darwin15]rails-v在您的Gemfile中列出的或native可用的任何gem源中找不到gem'pg(>=0)ruby'。运行bundleinstall以安装缺少的gem。bundleinstallFetchinggemmetadatafromhttps://rubygems.org/............Fetchingversionmetadatafromhttps://rubygems.org/...Fe
在Cooper的书BeginningRuby中,第166页有一个我无法重现的示例。classSongincludeComparableattr_accessor:lengthdef(other)@lengthother.lengthenddefinitialize(song_name,length)@song_name=song_name@length=lengthendenda=Song.new('Rockaroundtheclock',143)b=Song.new('BohemianRhapsody',544)c=Song.new('MinuteWaltz',60)a.betwee