我一直在尝试使用配置单元查询创建表。我已经在lib文件夹中设置了mysql-lib.jar
,并且还创建了hduser dfs /user/hive/warehouse
。
但是,如果我尝试创建新表,就会遇到问题。
这些是我的文件:
~.bashrc
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_161
export PATH=$JAVA_HOME/bin:$PATH
export HADOOP_HOME=/usr/local/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export HIVE_HOME=/usr/local/apache-hive-2.3.3-bin
export HIVE_CONF=/usr/local/apache-hive-2.3.3-bin/conf
export PATH=$HIVE_HOME/bin:$PATH
export CLASSPATH=$CLASSPATH:/usr/local/hadoop/lib/*:.
export CLASSPATH=$CLASSPATH:/usr/local/apache-hive-2.3.3-bin/lib/*:.
export SPARK_HOME=/usr/local/spark
export SPARK_CONF=/usr/local/spark/conf
export PATH=$SPARK_HOME/bin:$PATH
export CLASSPATH=$CLASSPATH:/usr/local/spark/*:.
hive-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<configuration>
<!--hive-site.xml template for MySQL backed metastore-->
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost/metastore</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hiveuser</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hivepassword</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>datanucleus.schema.autoCreateAll</name>
<value>false</value>
</property>
<!--start ACID related properties-->
<property>
<name>hive.support.concurrency</name>
<value>true</value>
</property>
<property>
<name>hive.txn.manager</name>
<value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
</property>
<property>
<name>hive.enforce.bucketing</name>
<value>true</value>
</property>
<property>
<name>hive.exec.dynamic.partition.mode</name>
<value>nonstrict</value>
</property>
<property>
<name>hive.compactor.initiator.on</name>
<value>true</value>
</property>
<property>
<name>hive.compactor.worker.threads</name>
<value>5</value>
</property>
<property>
<name>hive.timedout.txn.reaper.start</name>
<value>2s</value>
</property>
<!-- <property>
<name>hive.txn.timeout</name>
<value>60s</value>
</property>
-->
<property>
<name>hive.timedout.txn.reaper.interval</name>
<value>1s</value>
</property>
<property>
<name>hive.compactor.history.reaper.interval</name>
<value>1s</value>
</property>
<property>
<name>hive.compactor.cleaner.run.interval</name>
<value>1s</value>
</property>
<property>
<name>hive.compactor.check.interval</name>
<value>1s</value>
</property>
<property>
<name>hive.compactor.delta.num.threshold</name>
<value>2</value>
</property>
<!--end ACID related properties-->
<!--
<property>
<name>hive.exec.rowoffset</name>
<value>true</value>
</property>
-->
<!--
can be used by DataNucleus (have not tried)
javax.jdo.mapping.Catalog={the_catalog_name}
javax.jdo.mapping.Schema={the_schema_name}
-->
</configuration>
mysql schema creation also runs successfuly
SOURCE /usr/local/apache-hive-2.3.3-bin/scripts/metastore/upgrade/mysql/hive-schema-0.14.0.mysql.sql;
还创建了hiveuser
和hivepassword
并授予了他们特权。
但是,每当我在hive cli中创建表时,都会遇到错误以及ssl警告消息
Mon Jul 30 14:49:02 IST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
hive>
我要去哪里错了?