这篇文章给大家分享的是有关Hive CLI beeline是什么的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。未来替换hive脚本的最新使用方式。HiveServer2提供了一个新的命令行工具Beeline,它是基于SQLLine CLI的JDBC客户端。关于SQLLine的的知识,可以参考这个网站:http://sqlline.sourceforge.net/#manualBeeline工作模式有两种,即本地嵌入模式和远程模式。嵌入模式情况下,它返回一个嵌入式的Hive(类似于Hive CLI)。而远程模式则是通过Thrift协议与某个单独的HiveServer2进程进行连接通信。或者从系统出读取文件You can also specify the connection parameters on command line. This means you can find the command with the connection string from your UNIX shell history.CommandDescription!!quit
exits the Beeline client.The Beeline CLI supports these command line options:OptionDescriptionOptionDescription-ubeeline -u
db_URL-rReconnectto last used URL (if a user has previously used!connect
to a URL and used!save
to a beeline.properties file).Usage:beeline -r
Version: 2.1.0 (HIVE-13670)-nbeeline -n
valid_user-pbeeline -p
valid_password-dbeeline -d
driver_class-ebeeline -e "
query_string“Support to run multiple SQL statementsseparated by semicolonsin a singlequery_string: 1.2.0 (HIVE-9877)
Bug fix (null pointer exception): 0.13.0 (HIVE-5765)
Bug fix (–headerInterval not honored): 0.14.0 (HIVE-7647)
Bug fix (running-e
in background): 1.3.0 and 2.0.0(HIVE-6758);workaround availablefor earlier versionsScript file that should be executed.Usage:beeline -f
filepathVersion: 0.12.0 (HIVE-4268)
Note: If the script contains tabs, query compilation fails in version 0.12.0. This bug is fixed in version 0.13.0 (HIVE-6359).
Bug fix (running-f
in background):1.3.0 and 2.0.0(HIVE-6758);workaround availablefor earlier versionsThe password file to read password from.Version: 1.2.0 (HIVE-7175)Usevaluefor the given configuration property. Properties that are listed inhive.conf.restricted.list cannot be reset withhiveconf(seeRestricted List and Whitelist).Usage:beeline --hiveconf
prop1=
value1Version: 0.13.0 (HIVE-6173)Hive variable name and value. This is a Hive-specific setting in which variables can be set at the session level and referenced in Hive commands or queries.Usage:beeline --hivevar
var1=
value1Control whether color is used for display.Default is false.Usage:beeline --color=true
(Not supported for Separated-Value Output formats. SeeHIVE-9770)Show column names in query results (true) or not (false). Default is true.Usage:beeline --showHeader=false
The interval for redisplaying column headers, in number of rows, whenoutputformatis table. Default is 100.Usage:beeline --headerInterval=50
(Not supported for Separated-Value Output formats. SeeHIVE-9770)When connecting, skip building a list of all tables and columns for tab-completion of HiveQL statements (true) or build the list (false). Default is true.Usage:beeline --fastConnect=false
Enable/disable automatic transaction commit. Default is false.Usage:beeline --autoCommit=true
Show verbose error messages and debug information (true) or do not show (false). Default is false.Usage:beeline --verbose=true
Display warnings that are reported on the connection after issuing any HiveQL commands. Default is false.Usage:beeline --showWarnings=true
Display nested errors. Default is false.Usage:beeline --showNestedErrs=true
Format numbers using aDecimalFormatpattern.Usage:beeline --numberFormat="#,###,##0.00"
Continue running script even after errors (true) or do not continue (false). Default is false.Usage:beeline--force=true
The maximum width to display before truncating data, in characters,whenoutputformatis table. Default is to query the terminal for current width, then fall back to 80.Usage:beeline --maxWidth=150
The maximum column width, in characters,whenoutputformatis table. Default is 15.Usage:beeline --maxColumnWidth=25
Reduce the amount of informational messages displayed(true) or not (false). It also stops displaying the log messages for the query from HiveServer2 (Hive 0.14and later) and the HiveQL commands (Hive 1.2.0and later).Default is false.Usage:beeline --silent=true
Automatically save preferences (true) or do not autosave (false). Default is false.Usage:beeline --autosave=true
Format mode for result display. Default is table. SeeSeparated-Value Output Formatsbelow for description of recommended sv options.Usage:beeline --outputformat=tsv
Version: dsv/csv2/tsv2 added in 0.14.0 (HIVE-8615)If true, truncates table column in the console when it exceeds console length.Version: 0.14.0 (HIVE-6928)The delimiter for delimiter-separated values output format. Default is ‘|’ character.Version: 0.14.0 (HIVE-7390)Set the transaction isolation level to TRANSACTION_READ_COMMITTED
or TRANSACTION_SERIALIZABLE.
See the “Field Detail” section in the JavaConnectiondocumentation.Usage:beeline --isolation=TRANSACTION_SERIALIZABLE
Use historic behavior of printing null as empty string (true) or use current behavior of printing null as NULL (false). Default is false.Usage:beeline --nullemptystring=false
Version: 0.13.0 (HIVE-4485)–incremental=[true/false]Defaults tofalse.
When set tofalse
, the entire result set is fetched and buffered before being displayed, yielding optimal display column sizing. When set totrue
, result rows are displayed immediately as they are f开发云主机域名etched, 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).–helpDisplay a usage message.Usage:beeline --help
感谢各位的阅读!关于“Hive CLI beeline是什么”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!
今天就跟大家聊聊有关虚拟主机如何维护,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。无论是阿里云虚拟主机,还是其他品牌的虚拟主机,我们在使用时,都应该掌握一些主机系统日常维护的流程。系统与数据备份有效及时…
免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。