检查进程,Hadoop以及zookeeper均已启动,但启动Hive显示缺少CLI组件。
图一
如图一所示。
修改一:我们使用Mysql进行储存元文件,已将MySQL的jar包导进/hive/lib目录下,在启动依旧不好使。(Missing Hive CLI Jar)!!!
修改二:在/hive/conf目录下我们储存着将元文件配置的hive-site.xml,检查后无影响。文件内容如下。
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?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 athttp://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>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property><property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://127.0.0.1:3306/hive?createDatabaseIfNotExist=true&useSSL=false</value>
</property><property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>Hive_123</value>
</property>
</configuration>
修改三:重装Hive,方法可见其他博主。
修改四:source 环境变量,根目录下 source .bashrc
结果:hive正常启动,同时可安全退出。
原理不详,仅供参考。