2016-11-18 72 views
3

背景:無法啓動火花thriftserver(蜂房的site.xml火花沒有覆蓋缺省值)

  1. CentOS7
  2. Hadoop的2.7.3
  3. 火花2.0.1斌-hadoop2.7
  4. Apache的蜂房2.1.0槽(僅用於啓動由蜂巢--service metastore metastore服務)
  5. 有無HADOOP_HOME,SPARK_HOME和HIVE_HOME等配置
  6. MySQL的16年5月7日
  7. 已經把使用mysql-connector-java的5.1.40-bin.jar到兩個蜂箱/ lib中/和火花/瓶/

蜂房的site.xml:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> 
<configuration> 
    <property> 
     <name>javax.jdo.option.ConnectionURL</name> 
     <value>jdbc:mysql://www.test.com:3306/metastore</value> 
    </property> 
    <property> 
     <name>javax.jdo.option.ConnectionDriverName</name> 
     <value>com.mysql.jdbc.Driver</value> 
    </property> 
    <property> 
     <name>javax.jdo.option.ConnectionUserName</name> 
     <value>hive</value> 
    </property> 
    <property> 
     <name>javax.jdo.option.ConnectionPassword</name> 
     <value>password</value> 
    </property> 
    <property> 
     <name>hive.metastore.uris</name> 
     <value>thrift://www.test.com:9083</value> 
    </property> 
    <property> 
     <name>hive.metastore.schema.verification</name> 
     <value>true</value> 
    </property> 
</configuration> 

我把蜂房的site.xml到兩個蜂箱/ conf目錄/和火花/ conf目錄/

但運行start-thriftserver.sh,我得到了錯誤日誌(在spark_home /日誌/火花-HiveThriftServer2 .OUT):

...... 
INFO HiveUtils: Initializing HiveMetastoreConnection version 1.2.1 using Spark classes. 
INFO metastore: Trying to connect to metastore with URI thrift://www.test.com:9083 
INFO metastore: Connected to metastore. 
...... 
DEBUG ObjectStore: Overriding javax.jdo.option.ConnectionURL value null from jpox.properties with jdbc:derby:memory:;databaseName=/tmp/spark-37dcab7f-655a-4506-abd7-492a8620a33e/metastore;create=true 
...... 
INFO MetaStoreDirectSql: Using direct SQL, underlying DB is DERBY 
...... 
org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 

在日誌中我們可以看到屬性「hive.metastore.uris」確實有效。

但似乎其他mysql的相對屬性不起作用,Metastore仍然使用默認數據庫德比。

任何幫助表示讚賞!謝謝。

解決:

我刪除hive.metastore.uris因爲我只是用本地蜂巢。

<property> 
 
    <name>hive.metastore.uris</name> 
 
    <value>thrift://www.test.com:9083</value> 
 
</property> 
 
    \t

設置hive.metasotre.schema.verification爲false。感謝Nirmal的幫助。

回答

1

發現這個錯誤日誌

Caused by: MetaException(message:Version information not found in metastore 

集,在這兩個蜂箱和火花的conf的 hive.metastore.schema.verification在蜂房的site.xml假 值並重新啓動服務,然後再試一次

+0

尼爾默爾,感謝UR幫助,我像你說的那樣累了,但仍然是一樣的錯誤。 我認爲這些屬性具有默認設置,即使沒有在hive-site.xml中列出它們。 – Furyegg

+0

有沒有任何錯誤日誌蜂巢metastore.log –

+0

Nirmal,我沒有得到蜂房metastore.log。在spark_home/logs中運行spark_home/sbin/start-thriftserver.sh後,我只是獲得日誌。 並且可以在/ tmp/{user} /中運行hive cli後獲得hive.log。我只是編輯我的問題,請檢查。 – Furyegg