2014-12-02 70 views
0

在Linux(CentOS)中執行MapReduce作業時,我遇到以下錯誤。我在classpath中添加了所有的jar。數據庫名稱和表名已經存在於hive數據庫中,表中有一些數據列。然後我也無法訪問配置單元數據庫表中的數據。 我使用hadoop的香草版本進行工作。我是否需要通過mysql驅動程序路徑,用戶名和密碼爲hive編輯hive-site.xml文件?如果是,請告訴我爲蜂巢添加用戶名和密碼的過程。 我將所有依賴項文件放在配置單元和MapReduce編程中,並且還使用vanilla版本的Hadoop進行計算。而且我越來越vanilla版本的Hive InputOutput hadoop 2.5.1

org.apache.thrift.transport.TTransportException:無法在地址0.0.0.0/0.0.0.0:9083上創建ServerSocket。

在執行

蜂巢--service metastore

murali]# hadoop jar /home/murali/workspace/hadoop/HiveInputForMapper/target/HiveInputForMapper-0.0.1-SNAPSHOT.jar com.cosmonet.HiveInputDriver -libjars $LIBJARS 
 
Java HotSpot(TM) Server VM warning: You have loaded library /hadoop/hadoop/lib/native/libhadoop.so which might have disabled stack guard. The VM will try to fix the stack guard now. 
 
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'. 
 
14/12/02 18:53:08 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 
 
14/12/02 18:53:09 INFO metastore.HiveMetaStore: 0: Opening raw store with implemenation class:org.apache.hadoop.hive.metastore.ObjectStore 
 
14/12/02 18:53:10 INFO metastore.ObjectStore: ObjectStore, initialize called 
 
14/12/02 18:53:10 INFO DataNucleus.Persistence: Property datanucleus.cache.level2 unknown - will be ignored 
 
14/12/02 18:53:10 INFO DataNucleus.Persistence: Property hive.metastore.integral.jdo.pushdown unknown - will be ignored 
 
14/12/02 18:53:13 INFO metastore.ObjectStore: Setting MetaStore object pin classes with hive.metastore.cache.pinobjtypes="Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order" 
 
14/12/02 18:53:13 INFO metastore.MetaStoreDirectSql: MySQL check failed, assuming we are not on mysql: Lexical error at line 1, column 5. Encountered: "@" (64), after : "". 
 
14/12/02 18:53:15 INFO DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table. 
 
14/12/02 18:53:15 INFO DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table. 
 
14/12/02 18:53:15 INFO DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table. 
 
14/12/02 18:53:15 INFO DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table. 
 
14/12/02 18:53:15 INFO DataNucleus.Query: Reading in results for query "[email protected]" since the connection used is closing 
 
14/12/02 18:53:15 INFO metastore.ObjectStore: Initialized ObjectStore 
 
14/12/02 18:53:15 INFO metastore.HiveMetaStore: Added admin role in metastore 
 
14/12/02 18:53:15 INFO metastore.HiveMetaStore: Added public role in metastore 
 
14/12/02 18:53:16 INFO metastore.HiveMetaStore: No user is added in admin role, since config is empty 
 
14/12/02 18:53:16 INFO metastore.HiveMetaStore: 0: get_databases: NonExistentDatabaseUsedForHealthCheck 
 
14/12/02 18:53:16 INFO HiveMetaStore.audit: ugi=root \t ip=unknown-ip-addr \t cmd=get_databases: NonExistentDatabaseUsedForHealthCheck \t 
 
14/12/02 18:53:16 INFO metastore.HiveMetaStore: 0: get_table : db=default tbl=cpr_transaction 
 
14/12/02 18:53:16 INFO HiveMetaStore.audit: ugi=root \t ip=unknown-ip-addr \t cmd=get_table : db=default tbl=cpr_transaction \t 
 
Exception in thread "main" java.io.IOException: NoSuchObjectException(message:default.cpr_transaction table not found) 
 
\t at org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:97) 
 
\t at org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:71) 
 
\t at com.cosmonet.HiveInputDriver.run(HiveInputDriver.java:26) 
 
\t at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) 
 
\t at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) 
 
\t at com.cosmonet.HiveInputDriver.main(HiveInputDriver.java:49) 
 
\t at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
 
\t at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
 
\t at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
 
\t at java.lang.reflect.Method.invoke(Method.java:606) 
 
\t at org.apache.hadoop.util.RunJar.main(RunJar.java:212) 
 
Caused by: NoSuchObjectException(message:default.cpr_transaction table not found) 
 
\t at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_table(HiveMetaStore.java:1560) 
 
\t at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
 
\t at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
 
\t at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
 
\t at java.lang.reflect.Method.invoke(Method.java:606) 
 
\t at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:105) 
 
\t at com.sun.proxy.$Proxy9.get_table(Unknown Source) 
 
\t at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTable(HiveMetaStoreClient.java:997) 
 
\t at org.apache.hive.hcatalog.common.HCatUtil.getTable(HCatUtil.java:191) 
 
\t at org.apache.hive.hcatalog.mapreduce.InitializeInput.getInputJobInfo(InitializeInput.java:105) 
 
\t at org.apache.hive.hcatalog.mapreduce.InitializeInput.setInput(InitializeInput.java:86) 
 
\t at org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:95) 
 
\t ... 10 more

+0

我建議你編輯問題標題 – Leo 2014-12-02 13:38:23

回答

0

似乎是一個配置問題。你確定你已經正確配置了hive-site.xml嗎? 這是Hive cli客戶端從中獲取Metastore URL並連接以執行查詢的文件。 另外我看到你的配置單元cli試圖連接到'默認'分貝。那是你的桌子的數據庫嗎?

+0

雅我使用默認的數據庫只用於訪問,hive-site.xml我配置,也即時連接下面這一個... – 2014-12-03 04:41:47

+0

這是鏈接[鏈接](https ://github.com/MuralikrishnaGS/hive-site-xml-file/blob/master/hive-site.xml) – 2014-12-03 04:57:42