这是我正在运行的查询,但我得到一个例外。我把所有的罐子放在hive / lib文件夹中,但我仍然面临着这个问题。任何人都可以给我建议如何解决这个问题。提前谢谢。
hive> CREATE TABLE hbase_shipper(s_id int,s_name string)STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping"=":key,cf1:val")TBLPROPERTIES ("hbase.table.name"="hive_shipper");
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:MetaException(message:java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:240)
at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:410)
at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:403)
at org.apache.hadoop.hbase.client.ConnectionManager.getConnectionInternal(ConnectionManager.java:281)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:202)
at org.apache.hadoop.hive.hbase.HBaseStorageHandler.getHBaseAdmin(HBaseStorageHandler.java:120)
at org.apache.hadoop.hive.hbase.HBaseStorageHandler.preCreateTable(HBaseStorageHandler.java:200)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:664)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:657)
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 org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:156)
at com.sun.proxy.$Proxy9.createTable(Unknown Source)
at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:714)
at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:4135)
at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:306)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:160)
at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:88)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1653)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1412)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1195)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1049)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:213)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:736)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
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 org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:238)
... 36 more
Caused by: java.lang.NoClassDefFoundError: io/netty/channel/EventLoopGroup
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:2013)
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1978)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2072)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2098)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.<init>(ConnectionManager.java:631)
... 41 more
Caused by: java.lang.ClassNotFoundException: io.netty.channel.EventLoopGroup
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 48 more
)
at org.apache.hadoop.hive.hbase.HBaseStorageHandler.getHBaseAdmin(HBaseStorageHandler.java:124)
at org.apache.hadoop.hive.hbase.HBaseStorageHandler.preCreateTable(HBaseStorageHandler.java:200)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:664)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:657)
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 org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:156)
at com.sun.proxy.$Proxy9.createTable(Unknown Source)
at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:714)
at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:4135)
at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:306)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:160)
at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:88)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1653)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1412)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1195)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1049)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:213)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:736)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
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 org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
)
hive / lib中的Jars:
accumulo-core-1.6.0.jar commons-vfs2-2.0.jar hbase-thrift-1.0.3.jar jsr305-3.0.0.jar
accumulo-fate-1.6.0.jar curator-client-2.6.0.jar hive-accumulo-handler-1.2.1.jar jta-1.1.jar
accumulo-start-1.6.0.jar curator-framework-2.6.0.jar hive-ant-1.2.1.jar junit-4.11.jar
accumulo-trace-1.6.0.jar curator-recipes-2.6.0.jar hive-beeline-1.2.1.jar libfb303-0.9.2.jar
activation-1.1.jar datanucleus-api-jdo-3.2.6.jar hive-cli-1.2.1.jar libthrift-0.9.2.jar
ant-1.9.1.jar datanucleus-core-3.2.10.jar hive-common-1.2.1.jar log4j-1.2.16.jar
ant-launcher-1.9.1.jar datanucleus-rdbms-3.2.9.jar hive-contrib-1.2.1.jar mail-1.4.1.jar
antlr-2.7.7.jar derby-10.10.2.0.jar hive-exec-1.2.1.jar maven-scm-api-1.4.jar
antlr-runtime-3.4.jar eigenbase-properties-1.1.5.jar hive-hbase-handler-1.2.1.jar maven-scm-provider-svn-commons-1.4.jar
apache-curator-2.6.0.pom geronimo-annotation_1.0_spec-1.1.1.jar hive-hwi-1.2.1.jar maven-scm-provider-svnexe-1.4.jar
apache-log4j-extras-1.2.17.jar geronimo-jaspic_1.0_spec-1.0.jar hive-jdbc-1.2.1.jar mysql-connector-java-5.1.40.jar
asm-commons-3.1.jar geronimo-jta_1.1_spec-1.1.1.jar hive-jdbc-1.2.1-standalone.jar netty-3.7.0.Final.jar
asm-tree-3.1.jar groovy-all-2.1.6.jar hive-metastore-1.2.1.jar opencsv-2.3.jar
avro-1.7.5.jar guava-14.0.1.jar hive-serde-1.2.1.jar oro-2.0.8.jar
bonecp-0.8.0.RELEASE.jar hamcrest-core-1.1.jar hive-service-1.2.1.jar paranamer-2.3.jar
calcite-avatica-1.2.0-incubating.jar hbase-annotations-1.0.3.jar hive-shims-0.20S-1.2.1.jar parquet-hadoop-bundle-1.6.0.jar
calcite-core-1.2.0-incubating.jar hbase-annotations-1.0.3-tests.jar hive-shims-0.23-1.2.1.jar pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar
calcite-linq4j-1.2.0-incubating.jar hbase-checkstyle-1.0.3.jar hive-shims-1.2.1.jar php
commons-beanutils-1.7.0.jar hbase-client-1.0.3.jar hive-shims-common-1.2.1.jar plexus-utils-1.5.6.jar
commons-beanutils-core-1.8.0.jar hbase-common-1.0.3.jar hive-shims-scheduler-1.2.1.jar py
commons-cli-1.2.jar hbase-common-1.0.3-tests.jar hive-testutils-1.2.1.jar regexp-1.3.jar
commons-codec-1.4.jar hbase-examples-1.0.3.jar htrace-core-3.1.0-incubating.jar servlet-api-2.5.jar
commons-collections-3.2.1.jar hbase-hadoop2-compat-1.0.3.jar httpclient-4.4.jar snappy-java-1.0.5.jar
commons-compiler-2.7.6.jar hbase-hadoop-compat-1.0.3.jar httpcore-4.4.jar ST4-4.0.4.jar
commons-compress-1.4.1.jar hbase-it-1.0.3.jar ivy-2.4.0.jar stax-api-1.0.1.jar
commons-configuration-1.6.jar hbase-it-1.0.3-tests.jar janino-2.7.6.jar stringtemplate-3.2.1.jar
commons-dbcp-1.4.jar hbase-prefix-tree-1.0.3.jar jcommander-1.32.jar super-csv-2.2.0.jar
commons-digester-1.8.jar hbase-protocol-1.0.3.jar jdo-api-3.0.1.jar tempus-fugit-1.1.jar
commons-httpclient-3.0.1.jar hbase-resource-bundle-1.0.3.jar jetty-all-7.6.0.v20120127.jar velocity-1.5.jar
commons-io-2.4.jar hbase-rest-1.0.3.jar jetty-all-server-7.6.0.v20120127.jar xz-1.0.jar
commons-lang-2.6.jar hbase-server-1.0.3.jar jline-2.12.jar zookeeper-3.4.6.jar
commons-logging-1.1.3.jar hbase-server-1.0.3-tests.jar joda-time-2.5.jar
commons-math-2.1.jar hbase-shell-1.0.3.jar jpam-1.1.jar
commons-pool-1.5.4.jar hbase-testing-util-1.0.3.jar json-20090211.jar
答案 0 :(得分:1)
来自堆栈跟踪,
Caused by : java.lang.NoClassDefFoundError: io/netty/channel/EventLoopGroup
此课程不附带netty-3.7.0.Final.jar
。将其替换为最新(&gt; = 4.0)版本的netty-all-4.0.x.Final.jar
。