Hive Beeline 命令行参数
[hadoop@hive ~]$ beeline --help【中文版】
- The Beeline CLI 支持以下命令行参数:
- Option
- Description
- --autoCommit=[true/false] ---进入一个自动提交模式:beeline --autoCommit=true
- --autosave=[true/false] ---进入一个自动保存模式:beeline --autosave=true
- --color=[true/false] ---显示用到的颜色:beeline --color=true
- --delimiterForDSV= DELIMITER ---分隔值输出格式的分隔符。默认是“|”字符。
- --fastConnect=[true/false] ---在连接时,跳过组建表等对象:beeline --fastConnect=false
- --force=[true/false] ---是否强制运行脚本:beeline--force=true
- --headerInterval=ROWS ---输出的表间隔格式,默认是100: beeline --headerInterval=50
- --help ---帮助 beeline --help
- --hiveconf property=value ---设置属性值,以防被hive.conf.restricted.list重置:beeline --hiveconf prop1=value1
- --hivevar name=value ---设置变量名:beeline --hivevar var1=value1
- --incremental=[true/false] ---输出增量
- --isolation=LEVEL ---设置事务隔离级别:beeline --isolation=TRANSACTION_SERIALIZABLE
- --maxColumnWidth=MAXCOLWIDTH ---设置字符串列的最大宽度:beeline --maxColumnWidth=25
- --maxWidth=MAXWIDTH ---设置截断数据的最大宽度:beeline --maxWidth=150
- --nullemptystring=[true/false] ---打印空字符串:beeline --nullemptystring=false
- --numberFormat=[pattern] ---数字使用DecimalFormat:beeline --numberFormat="#,###,##0.00"
- --outputformat=[table/vertical/csv/tsv/dsv/csv2/tsv2] ---输出格式:beeline --outputformat=tsv
- --showHeader=[true/false] ---显示查询结果的列名:beeline --showHeader=false
- --showNestedErrs=[true/false] ---显示嵌套错误:beeline --showNestedErrs=true
- --showWarnings=[true/false] ---显示警告:beeline --showWarnings=true
- --silent=[true/false] ---减少显示的信息量:beeline --silent=true
- --truncateTable=[true/false] ---是否在客户端截断表的列
- --verbose=[true/false] ---显示详细错误信息和调试信息:beeline --verbose=true
- -d <driver class> ---使用一个驱动类:beeline -d driver_class
- -e <query> ---使用一个查询语句:beeline -e "query_string"
- -f <file> ---加载一个文件:beeline -f filepath 多个文件用-e file1 -e file2
- -n <username> ---加载一个用户名:beeline -n valid_user
- -p <password> ---加载一个密码:beeline -p valid_password
- -u <database URL> ---加载一个JDBC连接字符串:beeline -u db_URL </span>
[hadoop@hive ~]$ beeline --help【英文版】
Usage: java org.apache.hive.cli.beeline.BeeLine
-u <database url> the JDBC URL to connect to
-r reconnect to last saved connect url (in conjunction with !save)
-n <username> the username to connect as
-p <password> the password to connect as
-d <driver class> the driver class to use
-i <init file> script file for initialization
-e <query> query that should be executed
-f <exec file> script file that should be executed
-w (or) --password-file <password file> the password file to read password from
--hiveconf property=value Use value for given property
--hivevar name=value hive variable name and value
This is Hive specific settings in which variables
can be set at session level and referenced in Hive
commands or queries.
--property-file=<property-file> the file to read connection properties (url, driver, user, password) from
--color=[true/false] control whether color is used for display
--showHeader=[true/false] show column names in query results
--headerInterval=ROWS; the interval between which heades are displayed
--fastConnect=[true/false] skip building table/column list for tab-completion
--autoCommit=[true/false] enable/disable automatic transaction commit
--verbose=[true/false] show verbose error messages and debug info
--showWarnings=[true/false] display connection warnings
--showDbInPrompt=[true/false] display the current database name in the prompt
--showNestedErrs=[true/false] display nested errors
--numberFormat=[pattern] format numbers using DecimalFormat pattern
--force=[true/false] continue running script even after errors
--maxWidth=MAXWIDTH the maximum width of the terminal
--maxColumnWidth=MAXCOLWIDTH the maximum width to use when displaying columns
--silent=[true/false] be more silent
--autosave=[true/false] automatically save preferences
--outputformat=[table/vertical/csv2/tsv2/dsv/csv/tsv] format mode for result display
Note that csv, and tsv are deprecated - use csv2, tsv2 instead
--incremental=[true/false] Defaults to false. When set to false, the entire result set
is fetched and buffered before being displayed, yielding optimal
display column sizing. When set to true, result rows are displayed
immediately as they are fetched, yielding lower latency and
memory usage at the price of extra display column padding.
Setting --incremental=true is recommended if you encounter an OutOfMemory
on the client side (due to the fetched result set size being large).
Only applicable if --outputformat=table.
--incrementalBufferRows=NUMROWS the number of rows to buffer when printing rows on stdout,
defaults to 1000; only applicable if --incremental=true
and --outputformat=table
--truncateTable=[true/false] truncate table column when it exceeds length
--delimiterForDSV=DELIMITER specify the delimiter for delimiter-separated values output format (default: |)
--isolation=LEVEL set the transaction isolation level
--nullemptystring=[true/false] set to true to get historic behavior of printing null as empty string
--maxHistoryRows=MAXHISTORYROWS The maximum number of rows to store beeline history.
--help display this message
Example
1. Connect using simple authentication to HiveServer2 on localhost:10000
$ beeline -u jdbc:hive2://localhost:10000 username password
2. Connect using simple authentication to HiveServer2 on hs.local:10000 using -n for username and -p for password
$ beeline -n username -p password -u jdbc:hive2://hs2.local:10012
3. Connect using Kerberos authentication with hive/localhost@mydomain.com as HiveServer2 principal
$ beeline -u "jdbc:hive2://hs2.local:10013/default;principal=hive/localhost@mydomain.com"
4. Connect using SSL connection to HiveServer2 on localhost at 10000
$ beeline "jdbc:hive2://localhost:10000/default;ssl=true;sslTrustStore=/usr/local/truststore;trustStorePassword=mytruststorepassword"
5. Connect using LDAP authentication
$ beeline -u jdbc:hive2://hs2.local:10013/default <ldap-username> <ldap-password>
Hive Beeline 命令行参数的更多相关文章
- [Spark][Hive]Hive的命令行客户端启动:
[Spark][Hive]Hive的命令行客户端启动: [training@localhost Desktop]$ chkconfig | grep hive hive-metastore 0:off ...
- python处理命令行参数
直接从命令行执行py文件的时候如果带有参数,如何获取这些参数,如何解析? http://blog.chinaunix.net/uid-20786165-id-3182268.html sys.argv ...
- .NET Core采用的全新配置系统[5]: 聊聊默认支持的各种配置源[内存变量,环境变量和命令行参数]
较之传统通过App.config和Web.config这两个XML文件承载的配置系统,.NET Core采用的这个全新的配置模型的最大一个优势就是针对多种不同配置源的支持.我们可以将内存变量.命令行参 ...
- Shell特殊变量:Shell $0, $#, $*, $@, $?, $$和命令行参数
特殊变量列表 变量 含义 $0 当前脚本的文件名 $n 传递给脚本或函数的参数.n 是一个数字,表示第几个参数.例如,第一个参数是$1,第二个参数是$2. $# 传递给脚本或函数的参数个数. $* 传 ...
- powershell脚本,命令行参数传值,并绑定变量的例子
这是小技巧文章,所以文章不长.但原创唯一,非常重要.我搜了下,还真没有人发 powershell怎样 [命令行 参数 绑定],所以我决定写成博客. 搜索关键字如下: powershell 命令行 参数 ...
- VS2013 带命令行参数的调试问题 解决方案
int main(int argc,char* argv[]) argc是命令行总的参数个数,argv[]是argc个参数,其中第0个参数是程序的全名,以后的参数命令行后面跟的用户输入的参数 比如: ...
- 使用getopt()处理命令行参数
假设有一程序 testopt,其命令行选项参数有: -i 选项 -l 选项 -r 选项 -n <值> 带关联值的选项 则处理 ...
- 7z命令行参数中的路径
最近在自动化的过程中用到了7z命令行工具,发现其参数中的路径挺有意思的,在此总结一下.本文中所有demo使用的7z版本为:15.14 x64. 压缩某个文件夹 下面的命令会把g:\temp\目录和目录 ...
- [转]Python 命令行参数和getopt模块详解
FROM : http://www.tuicool.com/articles/jaqQvq 有时候我们需要写一些脚本处理一些任务,这时候往往需要提供一些命令行参数,根据不同参数进行不同的处理,在Pyt ...
随机推荐
- TensorFlow自定义训练函数
本文记录了在TensorFlow框架中自定义训练函数的模板并简述了使用自定义训练函数的优势与劣势. 首先需要说明的是,本文中所记录的训练函数模板参考自https://stackoverflow.com ...
- B+树索引页大小是如何确定的?
B+树简介 在正式介绍本文的主题前,需要对 B+ 树有一定的了解,B+树是一种磁盘上数据的索引结构,大概长这个样子. B+树的叶子节点是所有的数据,非叶子节点称为索引页,索引页里有若干个索引项,本例中 ...
- Python基础之字符串和编码
字符串和编码 字符串也是一种数据类型,但是字符串比较特殊的是还有个编码问题. 因为计算机自能处理数字,如果徐娅处理文本,就必须先把文本转换为数字才能处理,最早的计算机子设计时候采用8个比特(bit)作 ...
- Luogu2801 教主的魔法 (分块)
与hzw的分块2类似,放vector排序 #include <iostream> #include <cstdio> #include <cstring> #inc ...
- Pycharm5个非常有用的技巧
PyCharm 是一款非常强大的编写 python 代码的工具.掌握一些小技巧能成倍的提升写代码的效率,本篇介绍几个经常使用的小技巧. 一.分屏展示 当你想同时看到多个文件的时候: 右击标签页: 选择 ...
- 架构与思维:互联网高性能Web架构
1 什么是高性能Web架构 在互联网业务中,我们经常会面临流量巨大的复杂的分布式场景.这就要求我们在设计系统的时候保证系统具有承载高并发(High Concurrency)的能力,同时能够保证系统的高 ...
- HCIA-Datacom 1.1实验 华为VRP系统基本操作
前言:最近有很多老哥,会私信问我一些华为的网络配置和规划,在调试的时候我发现其实我命令也忘了很多,所以写一个文档,方便大家查阅 实验介绍: 实现功能:1.完成设备重命名,路由器接口IP地址 2.查看设 ...
- B/S结构通信系统原理
本文介绍JavaWeb的B/S结构通信原理 概念: Javaweb中B/S架构是一种系统架构形式,这里的B是Browser(浏览器),S是Server(服务器),是一种系统的架构形式,有 ...
- MAC上PKG打包
pkg是Mac平台上非常常见的一种安装包格式,如果你想要快速将软件制作为pkg文件,就千万不要错过Packages Mac版,Packages Mac版是Mac平台上能够快速为您生成pkg程序包的一款 ...
- cnblogs-theme-blogure
cnblogs-theme-blogure 又一个博客园主题 Blogure. 它使用 PetiteVue 和 PicoCSS. 喜欢的话可以帮个点 Star 么? 快速开始 确保博客园有 JS 权限 ...