我试图在AWS的EMR服务上设置hbase。我试图使用EMRFS作为它的hdfs。但是当我启动实例时,hbase master只会进入崩溃循环。
从阅读NoSuchFieldError
和com.google.inject
的存在开始,我认为CLASSPATH
可能存在问题,或者一个或多个库符合错误的版本
崩溃时的错误:
1) Error in custom provider, java.lang.ClassCastException: java.lang.NoSuchFieldError cannot be cast to java.lang.Exception
at com.amazon.ws.emr.hadoop.fs.guice.EmrFSBaseModule.provideEntityStore(EmrFSBaseModule.java:75)
at com.amazon.ws.emr.hadoop.fs.guice.EmrFSBaseModule.provideEntityStore(EmrFSBaseModule.java:75)
while locating com.amazon.ws.emr.hadoop.fs.dynamodb.EntityStore<com.amazon.ws.emr.hadoop.fs.dynamodb.Entity>
for field at com.amazon.ws.emr.hadoop.fs.s3n2.S3NativeFileSystem2.entityStore(S3NativeFileSystem2.java:41)
while locating com.amazon.ws.emr.hadoop.fs.s3n2.S3NativeFileSystem2
while locating org.apache.hadoop.fs.FileSystem annotated with @com.google.inject.name.Named(value=s3n2)
1 error
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1009)
at com.amazon.ws.emr.hadoop.fs.EmrFileSystem.initialize(EmrFileSystem.java:103)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2445)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2479)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2461)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:372)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)
at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:666)
at org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:112)
at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:631)
at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:491)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: java.lang.NoSuchFieldError cannot be cast to java.lang.Exception
at com.amazon.ws.emr.hadoop.fs.metrics.EmrRequestMetricCollector.collectMetrics(EmrRequestMetricCollector.java:42)
at com.amazonaws.AmazonWebServiceClient.endClientExecution(AmazonWebServiceClient.java:599)
at com.amazonaws.AmazonWebServiceClient.endClientExecution(AmazonWebServiceClient.java:580)
at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.describeTable(AmazonDynamoDBClient.java:1082)
at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.describeTable(AmazonDynamoDBClient.java:1088)
at com.amazon.ws.emr.hadoop.fs.dynamodb.impl.NativeDynamoDBEntityStore.describeTable(NativeDynamoDBEntityStore.java:279)
at com.amazon.ws.emr.hadoop.fs.dynamodb.impl.NativeDynamoDBEntityStore.tableExists(NativeDynamoDBEntityStore.java:274)
at com.amazon.ws.emr.hadoop.fs.dynamodb.impl.NativeDynamoDBEntityStore.initialize(NativeDynamoDBEntityStore.java:225)
at com.amazon.ws.emr.hadoop.fs.guice.EmrFSProdModule.createEntityStore(EmrFSProdModule.java:231)
at com.amazon.ws.emr.hadoop.fs.guice.EmrFSBaseModule.provideEntityStore(EmrFSBaseModule.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:104)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:94)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
... 13 more