文章目录
进入hive之前的
语法
hive [-hiveconf key=value]* [<-i filename>]* [<-f filename>|<-e query-string>] [-S]
参数说明:
-
i 从文件初始化 HQL
#将多个参数的设置写在一个文件中 hive -i 初始化文件 [hdp01@hdp01 hiveData]$ cat inithive.conf set hive.exec.mode.local.auto=true; [hdp01@hdp01 hiveData]$ hive -i inithive.conf which: no hbase in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/jdk1.8.0_211/bin:/usr/local/jdk1.8.0_211/jre/bin:/home/hdp01/.local/bin:/home/hdp01/bin:/home/hdp01/apps/hadoop-2.7.7/bin:/home/hdp01/apps/hadoop-2.7.7/sbin:/home/hdp01/apps/hive/bin) SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/hdp01/apps/apache-hive-2.3.6-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/hdp01/apps/hadoop-2.7.7/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.h