杨校老师课题之Hive数据仓库搭建

2022-05-11 17:04:07 浏览数 (1)

Hive的安装模式有三种:

  1. 嵌入模式
  2. 本地模式
  3. 远程模式

(1) 嵌入模式 基于系统本身的数据库derby数据库进行存储元数据,该模式是默认安装方式,配置简单 缺点: 一次只能连接一个客户端,仅适合在测试环境内使用

(2)本地模式 采用外部数据库进行存储元数据,该模式下不需要单独开启MetaStore服务

(3)远程模式 采用外部数据库进行存储元数据,该模式下需要单独开启MetaStore服务

嵌入模式
  1. 创建存储hive的磁盘目录
  2. 上传hive的二进制版的安装包
  3. 解压缩
  4. 进入hivebin目录内,执行hive
  5. 测试
    1. 查看所有数据库
代码语言:javascript复制
# 创建数据库
show databases;
# 创建数据库
create database book_hive ;
  1. 测试元数据存储是否同步
代码语言:javascript复制
[root@hadoop1 ~]# cd /usr/local/hive/
[root@hadoop1 hive]# ll
总用量 88732
drwxr-xr-x. 8 root root      159 4月  23 15:14 apache-hive-1.2.2-bin
-rw-r--r--. 1 root root 90859180 6月   6 2019 apache-hive-1.2.2-bin.tar.gz
[root@hadoop1 hive]# cd apache-hive-1.2.2-bin/
[root@hadoop1 apache-hive-1.2.2-bin]# ll
总用量 60
drwxr-xr-x. 4 root root   156 4月  23 15:15 bin
drwxr-xr-x. 2 root root   212 4月  23 15:14 conf
drwxr-xr-x. 4 root root    34 4月  23 15:14 examples
drwxr-xr-x. 7 root root    68 4月  23 15:14 hcatalog
drwxr-xr-x. 4 root root  8192 4月  23 15:14 lib
-rw-r--r--. 1 root root 24754 3月  31 2017 LICENSE
-rw-r--r--. 1 root root   397 3月  31 2017 NOTICE
-rw-r--r--. 1 root root  4374 4月   1 2017 README.txt
-rw-r--r--. 1 root root  4255 4月   1 2017 RELEASE_NOTES.txt
drwxr-xr-x. 3 root root    23 4月  23 15:14 scripts
# 重点在第20行 运行的命令
[root@hadoop1 apache-hive-1.2.2-bin]# bin/hive

Logging initialized using configuration in jar:file:/usr/local/hive/apache-hive-1.2.2-bin/lib/hive-common-1.2.2.jar!/hive-log4j.properties
hive> show databases;
OK
default
Time taken: 0.972 seconds, Fetched: 1 row(s)
hive> 
代码语言:javascript复制
[root@hadoop1 bin]# ./hive

Logging initialized using configuration in jar:file:/usr/local/hive/apache-hive-1.2.2-bin/lib/hive-common-1.2.2.jar!/hive-log4j.properties
hive> 
hive> show databases;
OK
book_hive
default
Time taken: 0.617 seconds, Fetched: 2 row(s)
hive> 
本地模式
  1. 首先需要安装MySQL数据库
    1. 离线安装
      1. 基于rpm可执行文件进行安装
      2. 基于tar.gz解压缩文件进行安装
    2. 在线安装
      1. 基于yum实现在线安装更新
      2. 基于wget获取MySQL的Repo
采用yum实现在线安装更新
代码语言:javascript复制
# 1. 获取下载mysql5.7的repo
[root@hadoop1 local]# wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm
[root@hadoop1 mysql]# ll
总用量 28
-rw-r--r--. 1 root root 25548 4月   7 2017 mysql57-community-release-el7-10.noarch.rpm
# 2. 安装mysql5.7的可执行文件
[root@hadoop1 local]#  rpm -ivh mysql57-community-release-el7-10.noarch.rpm

[root@hadoop1 local]#  rm /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 
[root@hadoop1 local]#  rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 

[root@hadoop1 local]#  yum install mysql-server
代码语言:javascript复制
[root@hadoop1 mysql]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' 

# 原因是没有输入用户名和密码 关键也不知道初始密码是什么?

#解决方案:
  #方式一:  查询初始化密码
  #方式二:  跳过权限认证
  
# 采用第二个方案  
[root@hadoop1 mysql]# vi /etc/my.cnf
# 在【mysqld】的空白处,添加如下三个单词:skip-grant-tables
# 示例:
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

######## 跳过MySQL的权限机制   就不需要输入密码 进去 更改密码  再将本命令删除 或 注释
skip-grant-tables

#保存退出!
#重启MySQL服务
[root@hadoop1 mysql]# systemctl restart mysqld
#进入MySQL软件
[root@hadoop1 etc]# mysql
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.7.37 MySQL Community Server (GPL)

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

# 1. 查询所有数据库
mysql> show databases;
 -------------------- 
| Database           |
 -------------------- 
| information_schema |
| mysql              |
| performance_schema |
| sys                |
 -------------------- 
4 rows in set (0.01 sec)

# 2.切入到MySQL数据库内:
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed


# 3.查询所有数据表
mysql> show  tables;
 --------------------------- 
| Tables_in_mysql           |
 --------------------------- 
| columns_priv              |
| db                        |
| engine_cost               |
| event                     |
| func                      |
| general_log               |
| gtid_executed             |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| innodb_index_stats        |
| innodb_table_stats        |
| ndb_binlog_index          |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| server_cost               |
| servers                   |
| slave_master_info         |
| slave_relay_log_info      |
| slave_worker_info         |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
 --------------------------- 
31 rows in set (0.00 sec)

# 4. 查询user表的表结构
mysql> desc user;
 ------------------------ ----------------------------------- ------ ----- ----------------------- ------- 
| Field                  | Type                              | Null | Key | Default               | Extra |
 ------------------------ ----------------------------------- ------ ----- ----------------------- ------- 
| Host                   | char(60)                          | NO   | PRI |                       |       |
| User                   | char(32)                          | NO   | PRI |                       |       |
| Select_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Insert_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Update_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Delete_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Create_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Drop_priv              | enum('N','Y')                     | NO   |     | N                     |       |
| Reload_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Shutdown_priv          | enum('N','Y')                     | NO   |     | N                     |       |
| Process_priv           | enum('N','Y')                     | NO   |     | N                     |       |
| File_priv              | enum('N','Y')                     | NO   |     | N                     |       |
| Grant_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| References_priv        | enum('N','Y')                     | NO   |     | N                     |       |
| Index_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| Alter_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| Show_db_priv           | enum('N','Y')                     | NO   |     | N                     |       |
| Super_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| Create_tmp_table_priv  | enum('N','Y')                     | NO   |     | N                     |       |
| Lock_tables_priv       | enum('N','Y')                     | NO   |     | N                     |       |
| Execute_priv           | enum('N','Y')                     | NO   |     | N                     |       |
| Repl_slave_priv        | enum('N','Y')                     | NO   |     | N                     |       |
| Repl_client_priv       | enum('N','Y')                     | NO   |     | N                     |       |
| Create_view_priv       | enum('N','Y')                     | NO   |     | N                     |       |
| Show_view_priv         | enum('N','Y')                     | NO   |     | N                     |       |
| Create_routine_priv    | enum('N','Y')                     | NO   |     | N                     |       |
| Alter_routine_priv     | enum('N','Y')                     | NO   |     | N                     |       |
| Create_user_priv       | enum('N','Y')                     | NO   |     | N                     |       |
| Event_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| Trigger_priv           | enum('N','Y')                     | NO   |     | N                     |       |
| Create_tablespace_priv | enum('N','Y')                     | NO   |     | N                     |       |
| ssl_type               | enum('','ANY','X509','SPECIFIED') | NO   |     |                       |       |
| ssl_cipher             | blob                              | NO   |     | NULL                  |       |
| x509_issuer            | blob                              | NO   |     | NULL                  |       |
| x509_subject           | blob                              | NO   |     | NULL                  |       |
| max_questions          | int(11) unsigned                  | NO   |     | 0                     |       |
| max_updates            | int(11) unsigned                  | NO   |     | 0                     |       |
| max_connections        | int(11) unsigned                  | NO   |     | 0                     |       |
| max_user_connections   | int(11) unsigned                  | NO   |     | 0                     |       |
| plugin                 | char(64)                          | NO   |     | mysql_native_password |       |
| authentication_string  | text                              | YES  |     | NULL                  |       |
| password_expired       | enum('N','Y')                     | NO   |     | N                     |       |
| password_last_changed  | timestamp                         | YES  |     | NULL                  |       |
| password_lifetime      | smallint(5) unsigned              | YES  |     | NULL                  |       |
| account_locked         | enum('N','Y')                     | NO   |     | N                     |       |
 ------------------------ ----------------------------------- ------ ----- ----------------------- ------- 
45 rows in set (0.00 sec)
# 通过查看表结构发现没有传统的Password字段,是authentication_string字段代表Password
mysql> update mysql.user set authentication_string = password('sorry') where user = 'root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1

# 修改密码成功后 ,需要删除MySQL登录的权限验证
[root@hadoop1 ~]# vi /etc/my.cnf
# skip-grant-tables # 跳过MySQL的权限机制   就不需要输入密码 进去 更改密码  再将本命令删除 或 注释
#设置密码不过期
default_password_lifetime=0

[root@hadoop1 ~]# systemctl restart mysqld
再次登录MySQL
代码语言:javascript复制
[root@hadoop1 etc]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@hadoop1 etc]# mysql -uroot -psorry
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.7.37

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED  BY 'sorry' WITH GRANT OPTION;

Hive配置
  1. 修改hive-env.sh文件
代码语言:javascript复制
[root@hadoop1 apache-hive-1.2.2-bin]# ll
总用量 84
drwxr-xr-x. 4 root root   156 4月  23 15:15 bin
drwxr-xr-x. 2 root root   212 4月  23 15:14 conf
-rw-r--r--. 1 root root 21108 4月  23 15:20 derby.log
drwxr-xr-x. 4 root root    34 4月  23 15:14 examples
drwxr-xr-x. 7 root root    68 4月  23 15:14 hcatalog
drwxr-xr-x. 4 root root  8192 4月  23 15:14 lib
-rw-r--r--. 1 root root 24754 3月  31 2017 LICENSE
drwxr-xr-x. 5 root root   133 4月  23 15:20 metastore_db
-rw-r--r--. 1 root root   397 3月  31 2017 NOTICE
-rw-r--r--. 1 root root  4374 4月   1 2017 README.txt
-rw-r--r--. 1 root root  4255 4月   1 2017 RELEASE_NOTES.txt
drwxr-xr-x. 3 root root    23 4月  23 15:14 scripts
[root@hadoop1 apache-hive-1.2.2-bin]# cd conf/
[root@hadoop1 conf]# ll
总用量 188
-rw-r--r--. 1 root root   1139 3月  31 2017 beeline-log4j.properties.template
-rw-r--r--. 1 root root 168715 4月   1 2017 hive-default.xml.template
-rw-r--r--. 1 root root   2378 3月  31 2017 hive-env.sh.template
-rw-r--r--. 1 root root   2662 3月  31 2017 hive-exec-log4j.properties.template
-rw-r--r--. 1 root root   3050 3月  31 2017 hive-log4j.properties.template
-rw-r--r--. 1 root root   1593 4月   1 2017 ivysettings.xml

[root@hadoop1 conf]# # 将 hive-env.sh.template 文件 拷贝一份 并更改名称为hive-env.sh
[root@hadoop1 conf]# cp hive-env.sh.template  hive-env.sh
[root@hadoop1 conf]# ll
总用量 192
-rw-r--r--. 1 root root   1139 3月  31 2017 beeline-log4j.properties.template
-rw-r--r--. 1 root root 168715 4月   1 2017 hive-default.xml.template
-rw-r--r--. 1 root root   2378 4月  23 17:18 hive-env.sh
-rw-r--r--. 1 root root   2378 3月  31 2017 hive-env.sh.template
-rw-r--r--. 1 root root   2662 3月  31 2017 hive-exec-log4j.properties.template
-rw-r--r--. 1 root root   3050 3月  31 2017 hive-log4j.properties.template
-rw-r--r--. 1 root root   1593 4月   1 2017 ivysettings.xml
  1. 打开hive-env.sh文件,修改hadoop的环节变量
代码语言:javascript复制
[root@hadoop1 conf]# vim  hive-env.sh
# 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.

# Set Hive and Hadoop environment variables here. These variables can be used
# to control the execution of Hive. It should be used by admins to configure
# the Hive installation (so that users do not have to set environment variables
# or set command line parameters to get correct behavior).
#
# The hive service being invoked (CLI/HWI etc.) is available via the environment
# variable SERVICE


# Hive Client memory usage can be an issue if a large number of clients
# are running at the same time. The flags below have been useful in 
# reducing memory usage:
#
# if [ "$SERVICE" = "cli" ]; then
#   if [ -z "$DEBUG" ]; then
#     export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX: UseParNewGC -XX:-UseGCOverheadLimit"
#   else
#     export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit"
#   fi
# fi

# The heap size of the jvm stared by hive shell script can be controlled via:
#
# export HADOOP_HEAPSIZE=1024
#
# Larger heap size may be required when running queries over large number of files or partitions. 
# By default hive shell scripts use a heap size of 256 (MB).  Larger heap size would also be 
# appropriate for hive server (hwi etc).


# Set HADOOP_HOME to point to a specific hadoop install directory
# HADOOP_HOME=${bin}/../../hadoop

# 添加Hadoop的环境变量
export HADOOP_HOME=/usr/local/hadoop/hadoop-2.7.4

#Hive Configuration Directory can be controlled by:
# export HIVE_CONF_DIR=

# Folder containing extra ibraries required for hive compilation/execution can be controlled by:
# export HIVE_AUX_JARS_PATH=
  1. 创建hive-site.xml文件,添加相关配置
代码语言:javascript复制
[root@hadoop1 conf]# pwd
/usr/local/hive/apache-hive-1.2.2-bin/conf
[root@hadoop1 conf]# ll
总用量 192
-rw-r--r--. 1 root root   1139 3月  31 2017 beeline-log4j.properties.template
-rw-r--r--. 1 root root 168715 4月   1 2017 hive-default.xml.template
-rw-r--r--. 1 root root   2458 4月  23 17:22 hive-env.sh
-rw-r--r--. 1 root root   2378 3月  31 2017 hive-env.sh.template
-rw-r--r--. 1 root root   2662 3月  31 2017 hive-exec-log4j.properties.template
-rw-r--r--. 1 root root   3050 3月  31 2017 hive-log4j.properties.template
-rw-r--r--. 1 root root   1593 4月   1 2017 ivysettings.xml

# 通过查询,发现hive-site.xml文件不存在!
  1. hive-site.xml
代码语言:javascript复制
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
  <!--MySQL链接协议-->
  <property>
      <name>javax.jdo.option.ConnectionURL</name>
      <value>jdbc:mysql://127.0.0.1:3306/hive?createDatabaseIFNotExist=true</value>
  </property>
      
  <!--MySQL驱动 jar需要单独上传-->
  <property>
      <name>javax.jdo.option.ConnectionDriverName</name>
      <value>com.mysql.jdbc.Driver</value>
  </property>
          
  <!--MySQL用户名-->
  <property>
      <name>javax.jdo.option.ConnectionUserName</name>
      <value>root</value>
  </property>

  <!--MySQL密码-->
  <property>
      <name>javax.jdo.option.ConnectionPassword</name>
      <value>sorry</value>
  </property>
</configuration>
  1. 上传MySQL驱动包到 lib目录内

利用rz命令实现上传操作

代码语言:javascript复制
[root@hadoop1 apache-hive-1.2.2-bin]# ll
总用量 84
drwxr-xr-x. 4 root root   156 4月  23 15:15 bin
drwxr-xr-x. 2 root root   252 4月  23 17:36 conf
-rw-r--r--. 1 root root 21108 4月  23 15:20 derby.log
drwxr-xr-x. 4 root root    34 4月  23 15:14 examples
drwxr-xr-x. 7 root root    68 4月  23 15:14 hcatalog
drwxr-xr-x. 4 root root  8192 4月  23 15:14 lib
-rw-r--r--. 1 root root 24754 3月  31 2017 LICENSE
drwxr-xr-x. 5 root root   133 4月  23 15:20 metastore_db
-rw-r--r--. 1 root root   397 3月  31 2017 NOTICE
-rw-r--r--. 1 root root  4374 4月   1 2017 README.txt
-rw-r--r--. 1 root root  4255 4月   1 2017 RELEASE_NOTES.txt
drwxr-xr-x. 3 root root    23 4月  23 15:14 scripts
[root@hadoop1 apache-hive-1.2.2-bin]# cd lib/
[root@hadoop1 lib]# ll
总用量 93528
-rw-r--r--.  1 root root  4368200 3月  18 2017 accumulo-core-1.6.0.jar
-rw-r--r--.  1 root root   102069 3月  18 2017 accumulo-fate-1.6.0.jar
-rw-r--r--.  1 root root    57420 3月  18 2017 accumulo-start-1.6.0.jar
-rw-r--r--.  1 root root   117409 3月  18 2017 accumulo-trace-1.6.0.jar
-rw-r--r--.  1 root root    62983 3月  18 2017 activation-1.1.jar
-rw-r--r--.  1 root root  1997485 3月  18 2017 ant-1.9.1.jar
-rw-r--r--.  1 root root    18336 3月  18 2017 ant-launcher-1.9.1.jar
-rw-r--r--.  1 root root   445288 3月  18 2017 antlr-2.7.7.jar
-rw-r--r--.  1 root root   164368 3月  18 2017 antlr-runtime-3.4.jar
-rw-r--r--.  1 root root    30359 3月  18 2017 apache-curator-2.6.0.pom
-rw-r--r--.  1 root root   448794 3月  18 2017 apache-log4j-extras-1.2.17.jar
-rw-r--r--.  1 root root    32693 3月  18 2017 asm-commons-3.1.jar
-rw-r--r--.  1 root root    21879 3月  18 2017 asm-tree-3.1.jar
-rw-r--r--.  1 root root   400680 3月  18 2017 avro-1.7.5.jar
-rw-r--r--.  1 root root   110600 3月  18 2017 bonecp-0.8.0.RELEASE.jar
-rw-r--r--.  1 root root   258370 3月  18 2017 calcite-avatica-1.2.0-incubating.jar
-rw-r--r--.  1 root root  3519262 3月  18 2017 calcite-core-1.2.0-incubating.jar
-rw-r--r--.  1 root root   442406 3月  18 2017 calcite-linq4j-1.2.0-incubating.jar
-rw-r--r--.  1 root root   188671 3月  18 2017 commons-beanutils-1.7.0.jar
-rw-r--r--.  1 root root   206035 3月  18 2017 commons-beanutils-core-1.8.0.jar
-rw-r--r--.  1 root root    41123 3月  18 2017 commons-cli-1.2.jar
-rw-r--r--.  1 root root    58160 3月  18 2017 commons-codec-1.4.jar
-rw-r--r--.  1 root root   588337 3月  18 2017 commons-collections-3.2.2.jar
-rw-r--r--.  1 root root    30595 3月  18 2017 commons-compiler-2.7.6.jar
-rw-r--r--.  1 root root   241367 3月  18 2017 commons-compress-1.4.1.jar
-rw-r--r--.  1 root root   298829 3月  18 2017 commons-configuration-1.6.jar
-rw-r--r--.  1 root root   160519 3月  18 2017 commons-dbcp-1.4.jar
-rw-r--r--.  1 root root   143602 3月  18 2017 commons-digester-1.8.jar
-rw-r--r--.  1 root root   279781 3月  18 2017 commons-httpclient-3.0.1.jar
-rw-r--r--.  1 root root   185140 3月  18 2017 commons-io-2.4.jar
-rw-r--r--.  1 root root   284220 3月  18 2017 commons-lang-2.6.jar
-rw-r--r--.  1 root root    62050 3月  18 2017 commons-logging-1.1.3.jar
-rw-r--r--.  1 root root   832410 3月  18 2017 commons-math-2.1.jar
-rw-r--r--.  1 root root    96221 3月  18 2017 commons-pool-1.5.4.jar
-rw-r--r--.  1 root root   415578 3月  18 2017 commons-vfs2-2.0.jar
-rw-r--r--.  1 root root    68866 3月  18 2017 curator-client-2.6.0.jar
-rw-r--r--.  1 root root   185245 3月  18 2017 curator-framework-2.6.0.jar
-rw-r--r--.  1 root root   248171 3月  18 2017 curator-recipes-2.6.0.jar
-rw-r--r--.  1 root root   339666 3月  18 2017 datanucleus-api-jdo-3.2.6.jar
-rw-r--r--.  1 root root  1890075 3月  18 2017 datanucleus-core-3.2.10.jar
-rw-r--r--.  1 root root  1809447 3月  18 2017 datanucleus-rdbms-3.2.9.jar
-rw-r--r--.  1 root root  2838580 3月  18 2017 derby-10.10.2.0.jar
-rw-r--r--.  1 root root    18482 3月  18 2017 eigenbase-properties-1.1.5.jar
-rw-r--r--.  1 root root    12452 3月  18 2017 geronimo-annotation_1.0_spec-1.1.1.jar
-rw-r--r--.  1 root root    30548 3月  18 2017 geronimo-jaspic_1.0_spec-1.0.jar
-rw-r--r--.  1 root root    16030 3月  18 2017 geronimo-jta_1.1_spec-1.1.1.jar
-rw-r--r--.  1 root root  6377448 3月  18 2017 groovy-all-2.1.6.jar
-rw-r--r--.  1 root root  2189117 3月  18 2017 guava-14.0.1.jar
-rw-r--r--.  1 root root    76643 3月  18 2017 hamcrest-core-1.1.jar
-rw-r--r--.  1 root root   121082 4月   3 2017 hive-accumulo-handler-1.2.2.jar
-rw-r--r--.  1 root root    47764 4月   3 2017 hive-ant-1.2.2.jar
-rw-r--r--.  1 root root   138274 4月   3 2017 hive-beeline-1.2.2.jar
-rw-r--r--.  1 root root    38367 4月   3 2017 hive-cli-1.2.2.jar
-rw-r--r--.  1 root root   290835 4月   3 2017 hive-common-1.2.2.jar
-rw-r--r--.  1 root root   120561 4月   3 2017 hive-contrib-1.2.2.jar
-rw-r--r--.  1 root root 20608029 4月   3 2017 hive-exec-1.2.2.jar
-rw-r--r--.  1 root root   114730 4月   3 2017 hive-hbase-handler-1.2.2.jar
-rw-r--r--.  1 root root    27390 4月   3 2017 hive-hwi-1.2.2.jar
-rw-r--r--.  1 root root   100417 4月   3 2017 hive-jdbc-1.2.2.jar
-rw-r--r--.  1 root root 15594358 4月   3 2017 hive-jdbc-1.2.2-standalone.jar
-rw-r--r--.  1 root root  5470775 4月   3 2017 hive-metastore-1.2.2.jar
-rw-r--r--.  1 root root   916566 4月   3 2017 hive-serde-1.2.2.jar
-rw-r--r--.  1 root root  1865061 4月   3 2017 hive-service-1.2.2.jar
-rw-r--r--.  1 root root    32242 4月   3 2017 hive-shims-0.20S-1.2.2.jar
-rw-r--r--.  1 root root    59903 4月   3 2017 hive-shims-0.23-1.2.2.jar
-rw-r--r--.  1 root root     8966 4月   3 2017 hive-shims-1.2.2.jar
-rw-r--r--.  1 root root   109178 4月   3 2017 hive-shims-common-1.2.2.jar
-rw-r--r--.  1 root root    13084 4月   3 2017 hive-shims-scheduler-1.2.2.jar
-rw-r--r--.  1 root root    14524 4月   3 2017 hive-testutils-1.2.2.jar
-rw-r--r--.  1 root root   719304 3月  18 2017 httpclient-4.4.jar
-rw-r--r--.  1 root root   321639 3月  18 2017 httpcore-4.4.jar
-rw-r--r--.  1 root root  1282424 3月  18 2017 ivy-2.4.0.jar
-rw-r--r--.  1 root root   611863 3月  18 2017 janino-2.7.6.jar
-rw-r--r--.  1 root root    60527 3月  18 2017 jcommander-1.32.jar
-rw-r--r--.  1 root root   201124 3月  18 2017 jdo-api-3.0.1.jar
-rw-r--r--.  1 root root  1681148 3月  18 2017 jetty-all-7.6.0.v20120127.jar
-rw-r--r--.  1 root root  1683027 3月  18 2017 jetty-all-server-7.6.0.v20120127.jar
-rw-r--r--.  1 root root   213854 3月  18 2017 jline-2.12.jar
-rw-r--r--.  1 root root   588001 3月  18 2017 joda-time-2.5.jar
-rw-r--r--.  1 root root    12131 3月  18 2017 jpam-1.1.jar
-rw-r--r--.  1 root root    45944 3月  18 2017 json-20090211.jar
-rw-r--r--.  1 root root    33031 3月  18 2017 jsr305-3.0.0.jar
-rw-r--r--.  1 root root    15071 3月  18 2017 jta-1.1.jar
-rw-r--r--.  1 root root   245039 3月  18 2017 junit-4.11.jar
-rw-r--r--.  1 root root   313686 3月  18 2017 libfb303-0.9.2.jar
-rw-r--r--.  1 root root   227712 3月  18 2017 libthrift-0.9.2.jar
-rw-r--r--.  1 root root   481535 3月  18 2017 log4j-1.2.16.jar
-rw-r--r--.  1 root root   447676 3月  18 2017 mail-1.4.1.jar
-rw-r--r--.  1 root root    94421 3月  18 2017 maven-scm-api-1.4.jar
-rw-r--r--.  1 root root    40066 3月  18 2017 maven-scm-provider-svn-commons-1.4.jar
-rw-r--r--.  1 root root    69858 3月  18 2017 maven-scm-provider-svnexe-1.4.jar
-rw-r--r--.  1 root root  1208356 3月  18 2017 netty-3.7.0.Final.jar
-rw-r--r--.  1 root root    19827 3月  18 2017 opencsv-2.3.jar
-rw-r--r--.  1 root root    65261 3月  18 2017 oro-2.0.8.jar
-rw-r--r--.  1 root root    29555 3月  18 2017 paranamer-2.3.jar
-rw-r--r--.  1 root root  2796935 3月  18 2017 parquet-hadoop-bundle-1.6.0.jar
-rw-r--r--.  1 root root    48557 3月  18 2017 pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar
drwxr-xr-x.  6 root root      104 4月  23 15:14 php
-rw-r--r--.  1 root root   250546 3月  18 2017 plexus-utils-1.5.6.jar
drwxr-xr-x. 10 root root      150 4月  23 15:14 py
-rw-r--r--.  1 root root    25429 3月  18 2017 regexp-1.3.jar
-rw-r--r--.  1 root root   105112 3月  18 2017 servlet-api-2.5.jar
-rw-r--r--.  1 root root  1251514 3月  18 2017 snappy-java-1.0.5.jar
-rw-r--r--.  1 root root   236660 3月  18 2017 ST4-4.0.4.jar
-rw-r--r--.  1 root root    26514 3月  18 2017 stax-api-1.0.1.jar
-rw-r--r--.  1 root root   148627 3月  18 2017 stringtemplate-3.2.1.jar
-rw-r--r--.  1 root root    93210 3月  18 2017 super-csv-2.2.0.jar
-rw-r--r--.  1 root root    55953 3月  18 2017 tempus-fugit-1.1.jar
-rw-r--r--.  1 root root   392124 3月  18 2017 velocity-1.5.jar
-rw-r--r--.  1 root root    94672 3月  18 2017 xz-1.0.jar
-rw-r--r--.  1 root root   792964 3月  18 2017 zookeeper-3.4.6.jar
[root@hadoop1 lib]# rz -E
rz waiting to receive.
[root@hadoop1 lib]# ll
总用量 94512
-rw-r--r--.  1 root root  4368200 3月  18 2017 accumulo-core-1.6.0.jar
-rw-r--r--.  1 root root   102069 3月  18 2017 accumulo-fate-1.6.0.jar
-rw-r--r--.  1 root root    57420 3月  18 2017 accumulo-start-1.6.0.jar
-rw-r--r--.  1 root root   117409 3月  18 2017 accumulo-trace-1.6.0.jar
-rw-r--r--.  1 root root    62983 3月  18 2017 activation-1.1.jar
-rw-r--r--.  1 root root  1997485 3月  18 2017 ant-1.9.1.jar
-rw-r--r--.  1 root root    18336 3月  18 2017 ant-launcher-1.9.1.jar
-rw-r--r--.  1 root root   445288 3月  18 2017 antlr-2.7.7.jar
-rw-r--r--.  1 root root   164368 3月  18 2017 antlr-runtime-3.4.jar
-rw-r--r--.  1 root root    30359 3月  18 2017 apache-curator-2.6.0.pom
-rw-r--r--.  1 root root   448794 3月  18 2017 apache-log4j-extras-1.2.17.jar
-rw-r--r--.  1 root root    32693 3月  18 2017 asm-commons-3.1.jar
-rw-r--r--.  1 root root    21879 3月  18 2017 asm-tree-3.1.jar
-rw-r--r--.  1 root root   400680 3月  18 2017 avro-1.7.5.jar
-rw-r--r--.  1 root root   110600 3月  18 2017 bonecp-0.8.0.RELEASE.jar
-rw-r--r--.  1 root root   258370 3月  18 2017 calcite-avatica-1.2.0-incubating.jar
-rw-r--r--.  1 root root  3519262 3月  18 2017 calcite-core-1.2.0-incubating.jar
-rw-r--r--.  1 root root   442406 3月  18 2017 calcite-linq4j-1.2.0-incubating.jar
-rw-r--r--.  1 root root   188671 3月  18 2017 commons-beanutils-1.7.0.jar
-rw-r--r--.  1 root root   206035 3月  18 2017 commons-beanutils-core-1.8.0.jar
-rw-r--r--.  1 root root    41123 3月  18 2017 commons-cli-1.2.jar
-rw-r--r--.  1 root root    58160 3月  18 2017 commons-codec-1.4.jar
-rw-r--r--.  1 root root   588337 3月  18 2017 commons-collections-3.2.2.jar
-rw-r--r--.  1 root root    30595 3月  18 2017 commons-compiler-2.7.6.jar
-rw-r--r--.  1 root root   241367 3月  18 2017 commons-compress-1.4.1.jar
-rw-r--r--.  1 root root   298829 3月  18 2017 commons-configuration-1.6.jar
-rw-r--r--.  1 root root   160519 3月  18 2017 commons-dbcp-1.4.jar
-rw-r--r--.  1 root root   143602 3月  18 2017 commons-digester-1.8.jar
-rw-r--r--.  1 root root   279781 3月  18 2017 commons-httpclient-3.0.1.jar
-rw-r--r--.  1 root root   185140 3月  18 2017 commons-io-2.4.jar
-rw-r--r--.  1 root root   284220 3月  18 2017 commons-lang-2.6.jar
-rw-r--r--.  1 root root    62050 3月  18 2017 commons-logging-1.1.3.jar
-rw-r--r--.  1 root root   832410 3月  18 2017 commons-math-2.1.jar
-rw-r--r--.  1 root root    96221 3月  18 2017 commons-pool-1.5.4.jar
-rw-r--r--.  1 root root   415578 3月  18 2017 commons-vfs2-2.0.jar
-rw-r--r--.  1 root root    68866 3月  18 2017 curator-client-2.6.0.jar
-rw-r--r--.  1 root root   185245 3月  18 2017 curator-framework-2.6.0.jar
-rw-r--r--.  1 root root   248171 3月  18 2017 curator-recipes-2.6.0.jar
-rw-r--r--.  1 root root   339666 3月  18 2017 datanucleus-api-jdo-3.2.6.jar
-rw-r--r--.  1 root root  1890075 3月  18 2017 datanucleus-core-3.2.10.jar
-rw-r--r--.  1 root root  1809447 3月  18 2017 datanucleus-rdbms-3.2.9.jar
-rw-r--r--.  1 root root  2838580 3月  18 2017 derby-10.10.2.0.jar
-rw-r--r--.  1 root root    18482 3月  18 2017 eigenbase-properties-1.1.5.jar
-rw-r--r--.  1 root root    12452 3月  18 2017 geronimo-annotation_1.0_spec-1.1.1.jar
-rw-r--r--.  1 root root    30548 3月  18 2017 geronimo-jaspic_1.0_spec-1.0.jar
-rw-r--r--.  1 root root    16030 3月  18 2017 geronimo-jta_1.1_spec-1.1.1.jar
-rw-r--r--.  1 root root  6377448 3月  18 2017 groovy-all-2.1.6.jar
-rw-r--r--.  1 root root  2189117 3月  18 2017 guava-14.0.1.jar
-rw-r--r--.  1 root root    76643 3月  18 2017 hamcrest-core-1.1.jar
-rw-r--r--.  1 root root   121082 4月   3 2017 hive-accumulo-handler-1.2.2.jar
-rw-r--r--.  1 root root    47764 4月   3 2017 hive-ant-1.2.2.jar
-rw-r--r--.  1 root root   138274 4月   3 2017 hive-beeline-1.2.2.jar
-rw-r--r--.  1 root root    38367 4月   3 2017 hive-cli-1.2.2.jar
-rw-r--r--.  1 root root   290835 4月   3 2017 hive-common-1.2.2.jar
-rw-r--r--.  1 root root   120561 4月   3 2017 hive-contrib-1.2.2.jar
-rw-r--r--.  1 root root 20608029 4月   3 2017 hive-exec-1.2.2.jar
-rw-r--r--.  1 root root   114730 4月   3 2017 hive-hbase-handler-1.2.2.jar
-rw-r--r--.  1 root root    27390 4月   3 2017 hive-hwi-1.2.2.jar
-rw-r--r--.  1 root root   100417 4月   3 2017 hive-jdbc-1.2.2.jar
-rw-r--r--.  1 root root 15594358 4月   3 2017 hive-jdbc-1.2.2-standalone.jar
-rw-r--r--.  1 root root  5470775 4月   3 2017 hive-metastore-1.2.2.jar
-rw-r--r--.  1 root root   916566 4月   3 2017 hive-serde-1.2.2.jar
-rw-r--r--.  1 root root  1865061 4月   3 2017 hive-service-1.2.2.jar
-rw-r--r--.  1 root root    32242 4月   3 2017 hive-shims-0.20S-1.2.2.jar
-rw-r--r--.  1 root root    59903 4月   3 2017 hive-shims-0.23-1.2.2.jar
-rw-r--r--.  1 root root     8966 4月   3 2017 hive-shims-1.2.2.jar
-rw-r--r--.  1 root root   109178 4月   3 2017 hive-shims-common-1.2.2.jar
-rw-r--r--.  1 root root    13084 4月   3 2017 hive-shims-scheduler-1.2.2.jar
-rw-r--r--.  1 root root    14524 4月   3 2017 hive-testutils-1.2.2.jar
-rw-r--r--.  1 root root   719304 3月  18 2017 httpclient-4.4.jar
-rw-r--r--.  1 root root   321639 3月  18 2017 httpcore-4.4.jar
-rw-r--r--.  1 root root  1282424 3月  18 2017 ivy-2.4.0.jar
-rw-r--r--.  1 root root   611863 3月  18 2017 janino-2.7.6.jar
-rw-r--r--.  1 root root    60527 3月  18 2017 jcommander-1.32.jar
-rw-r--r--.  1 root root   201124 3月  18 2017 jdo-api-3.0.1.jar
-rw-r--r--.  1 root root  1681148 3月  18 2017 jetty-all-7.6.0.v20120127.jar
-rw-r--r--.  1 root root  1683027 3月  18 2017 jetty-all-server-7.6.0.v20120127.jar
-rw-r--r--.  1 root root   213854 3月  18 2017 jline-2.12.jar
-rw-r--r--.  1 root root   588001 3月  18 2017 joda-time-2.5.jar
-rw-r--r--.  1 root root    12131 3月  18 2017 jpam-1.1.jar
-rw-r--r--.  1 root root    45944 3月  18 2017 json-20090211.jar
-rw-r--r--.  1 root root    33031 3月  18 2017 jsr305-3.0.0.jar
-rw-r--r--.  1 root root    15071 3月  18 2017 jta-1.1.jar
-rw-r--r--.  1 root root   245039 3月  18 2017 junit-4.11.jar
-rw-r--r--.  1 root root   313686 3月  18 2017 libfb303-0.9.2.jar
-rw-r--r--.  1 root root   227712 3月  18 2017 libthrift-0.9.2.jar
-rw-r--r--.  1 root root   481535 3月  18 2017 log4j-1.2.16.jar
-rw-r--r--.  1 root root   447676 3月  18 2017 mail-1.4.1.jar
-rw-r--r--.  1 root root    94421 3月  18 2017 maven-scm-api-1.4.jar
-rw-r--r--.  1 root root    40066 3月  18 2017 maven-scm-provider-svn-commons-1.4.jar
-rw-r--r--.  1 root root    69858 3月  18 2017 maven-scm-provider-svnexe-1.4.jar
-rw-r--r--.  1 root root  1006904 4月  23 09:04 mysql-connector-java-5.1.49.jar
-rw-r--r--.  1 root root  1208356 3月  18 2017 netty-3.7.0.Final.jar
-rw-r--r--.  1 root root    19827 3月  18 2017 opencsv-2.3.jar
-rw-r--r--.  1 root root    65261 3月  18 2017 oro-2.0.8.jar
-rw-r--r--.  1 root root    29555 3月  18 2017 paranamer-2.3.jar
-rw-r--r--.  1 root root  2796935 3月  18 2017 parquet-hadoop-bundle-1.6.0.jar
-rw-r--r--.  1 root root    48557 3月  18 2017 pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar
drwxr-xr-x.  6 root root      104 4月  23 15:14 php
-rw-r--r--.  1 root root   250546 3月  18 2017 plexus-utils-1.5.6.jar
drwxr-xr-x. 10 root root      150 4月  23 15:14 py
-rw-r--r--.  1 root root    25429 3月  18 2017 regexp-1.3.jar
-rw-r--r--.  1 root root   105112 3月  18 2017 servlet-api-2.5.jar
-rw-r--r--.  1 root root  1251514 3月  18 2017 snappy-java-1.0.5.jar
-rw-r--r--.  1 root root   236660 3月  18 2017 ST4-4.0.4.jar
-rw-r--r--.  1 root root    26514 3月  18 2017 stax-api-1.0.1.jar
-rw-r--r--.  1 root root   148627 3月  18 2017 stringtemplate-3.2.1.jar
-rw-r--r--.  1 root root    93210 3月  18 2017 super-csv-2.2.0.jar
-rw-r--r--.  1 root root    55953 3月  18 2017 tempus-fugit-1.1.jar
-rw-r--r--.  1 root root   392124 3月  18 2017 velocity-1.5.jar
-rw-r--r--.  1 root root    94672 3月  18 2017 xz-1.0.jar
-rw-r--r--.  1 root root   792964 3月  18 2017 zookeeper-3.4.6.jar
  1. 完成,运行!
代码语言:javascript复制
# 是在/usr/local/hive/apache-hive-1.2.2-bin/bin 下执行的hive开启
[root@hadoop1 bin]# ./hive

Logging initialized using configuration in jar:file:/usr/local/hive/apache-hive-1.2.2-bin/lib/hive-common-1.2.2.jar!/hive-log4j.properties
Sat Apr 23 17:43:48 CST 2022 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.
Sat Apr 23 17:43:48 CST 2022 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.
Sat Apr 23 17:43:48 CST 2022 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.
Sat Apr 23 17:43:48 CST 2022 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.
Sat Apr 23 17:43:49 CST 2022 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.
Sat Apr 23 17:43:49 CST 2022 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.
Sat Apr 23 17:43:49 CST 2022 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.
Sat Apr 23 17:43:49 CST 2022 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.
hive> show databases;
OK
default
Time taken: 0.65 seconds, Fetched: 1 row(s)
hive> create database hive_book;
OK
Time taken: 0.199 seconds
hive> show databases;
OK
default
hive_book
Time taken: 0.01 seconds, Fetched: 2 row(s)
hive> 
代码语言:javascript复制
[root@hadoop1 ~]# cd /usr/local/hive/apache-hive-1.2.2-bin/

# 是在/usr/local/hive/apache-hive-1.2.2-bin/ 下执行的hive开启
[root@hadoop1 apache-hive-1.2.2-bin]# bin/hive

Logging initialized using configuration in jar:file:/usr/local/hive/apache-hive-1.2.2-bin/lib/hive-common-1.2.2.jar!/hive-log4j.properties
Sat Apr 23 17:44:48 CST 2022 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.
Sat Apr 23 17:44:48 CST 2022 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.
Sat Apr 23 17:44:48 CST 2022 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.
Sat Apr 23 17:44:48 CST 2022 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.
Sat Apr 23 17:44:48 CST 2022 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.
Sat Apr 23 17:44:48 CST 2022 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.
Sat Apr 23 17:44:48 CST 2022 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.
Sat Apr 23 17:44:48 CST 2022 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.
hive> show databases;
OK
default
hive_book
Time taken: 0.63 seconds, Fetched: 2 row(s)
hive> 

总结说明:

Hive利用MySQL进行存储元数据【MetaStore】

内置函数查询
代码语言:javascript复制
hive> show functions;
OK
!
!=
%
&
*
 
-
/
<
<=
<=>
<>
=
==
>
>=
^
abs
acos
add_months
and
array
array_contains
ascii
asin
assert_true
atan
avg
base64
between
bin
case
cbrt
ceil
ceiling
coalesce
collect_list
collect_set
compute_stats
concat
concat_ws
context_ngrams
conv
corr
cos
count
covar_pop
covar_samp
create_union
cume_dist
current_database
current_date
current_timestamp
current_user
date_add
date_format
date_sub
datediff
day
dayofmonth
decode
degrees
dense_rank
div
e
elt
encode
ewah_bitmap
ewah_bitmap_and
ewah_bitmap_empty
ewah_bitmap_or
exp
explode
factorial
field
find_in_set
first_value
floor
format_number
from_unixtime
from_utc_timestamp
get_json_object
greatest
hash
hex
histogram_numeric
hour
if
in
in_file
index
initcap
inline
instr
isnotnull
isnull
java_method
json_tuple
lag
last_day
last_value
lcase
lead
least
length
levenshtein
like
ln
locate
log
log10
log2
lower
lpad
ltrim
map
map_keys
map_values
matchpath
max
min
minute
month
months_between
named_struct
negative
next_day
ngrams
noop
noopstreaming
noopwithmap
noopwithmapstreaming
not
ntile
nvl
or
parse_url
parse_url_tuple
percent_rank
percentile
percentile_approx
pi
pmod
posexplode
positive
pow
power
printf
radians
rand
rank
reflect
reflect2
regexp
regexp_extract
regexp_replace
repeat
reverse
rlike
round
row_number
rpad
rtrim
second
sentences
shiftleft
shiftright
shiftrightunsigned
sign
sin
size
sort_array
soundex
space
split
sqrt
stack
std
stddev
stddev_pop
stddev_samp
str_to_map
struct
substr
substring
sum
tan
to_date
to_unix_timestamp
to_utc_timestamp
translate
trim
trunc
ucase
unbase64
unhex
unix_timestamp
upper
var_pop
var_samp
variance
weekofyear
when
windowingtablefunction
xpath
xpath_boolean
xpath_double
xpath_float
xpath_int
xpath_long
xpath_number
xpath_short
xpath_string
year
|
~
Time taken: 0.018 seconds, Fetched: 216 row(s)

0 人点赞