Hive学习笔记5@beeline命令
2017-03-03 16:00
288 查看
Beeline工作模式有两种,即本地嵌入模式和远程模式。嵌入模式情况下,它返回一个嵌入式的Hive(类似于Hive
CLI)。而远程模式则是通过Thrift协议与某个单独的HiveServer2进程进行连接通信
Usage: beeline --autoCommit=true
Usage: beeline --autosave=true
Usage: beeline --color=true
(Not supported for Separated-Value Outputformats. See HIVE-9770)
Version: 0.14.0 (HIVE-7390)
HiveQL statements (true) or build the list(false). Default is true.
Usage: beeline --fastConnect=false
Usage: beeline--force=true
Default is 100.
Usage: beeline --headerInterval=50
(Not supported for Separated-Value Outputformats. See HIVE-9770)
Usage: beeline --help
--hiveconf property=value
Use value for the given configurationproperty. Properties that are listed in hive.conf.restricted.list cannot bereset with hiveconf (see Restricted List and Whitelist).
Usage: beeline --hiveconf prop1=value1
Version: 0.13.0 (HIVE-6173)
at the session level and referenced in Hivecommands or queries.
Usage: beeline --hivevar var1=value1
or TRANSACTION_SERIALIZABLE.
See the "Field Detail" section inthe Java Connection documentation.
Usage: beeline--isolation=TRANSACTION_SERIALIZABLE
Usage: beeline --maxColumnWidth=25
Default is to query the terminal forcurrent width, then fall back to 80.
Usage: beeline --maxWidth=150
null as NULL (false). Default isfalse.
Usage: beeline --nullemptystring=false
Version: 0.13.0 (HIVE-4485)
Usage: beeline--numberFormat="#,###,##0.00"
Usage: beeline --outputformat=tsv
Version: dsv/csv2/tsv2 added in 0.14.0 (HIVE-8615)
Usage: beeline --showHeader=false
Usage: beeline --showNestedErrs=true
Default is false.
Usage: beeline --showWarnings=true
Usage: beeline --silent=true
Version: 0.14.0 (HIVE-6928)
Default is false.
Usage: beeline --verbose=true
Usage: beeline -d driver_class
Usage: beeline -e"query_string"
Icon
Only a single command per -e option issupported. You can't provide multiple semicolon separated commands. Use the -eoption multiple times if you want to achieve this.
Bug fix (null pointer exception): 0.13.0(HIVE-5765)
Bug to be fixed (running -e in background):workaround available (HIVE-6758)
Bug fix (--headerInterval not honored):0.14.0 (HIVE-7647)
Usage: beeline -f filepath
Version: 0.12.0 (HIVE-4268)
Note: If the script contains tabs, querycompilation fails in version 0.12.0. This bug is fixed in version 0.13.0(HIVE-6359).
Bug to be fixed (running -f in background):workaround available (HIVE-6758)
Usage: beeline -n valid_user
Usage: beeline -p valid_password
Usage: beeline -u db_URL
CLI)。而远程模式则是通过Thrift协议与某个单独的HiveServer2进程进行连接通信
Beeline CLI命令参数
Description--autoCommit=[true/false]
Enable/disable automatic transactioncommit. Default is false.Usage: beeline --autoCommit=true
--autosave=[true/false]
Automatically save preferences (true) or donot autosave (false). Default is false.Usage: beeline --autosave=true
--color=[true/false]
Control whether color is used for display.Default is false.Usage: beeline --color=true
(Not supported for Separated-Value Outputformats. See HIVE-9770)
--delimiterForDSV= DELIMITER
The delimiter for delimiter-separatedvalues output format. Default is '|' character.Version: 0.14.0 (HIVE-7390)
--fastConnect=[true/false]
When connecting, skip building a list ofall tables and columns for tab-completion ofHiveQL statements (true) or build the list(false). Default is true.
Usage: beeline --fastConnect=false
--force=[true/false]
Continue running script even after errors(true) or do not continue (false). Default is false.Usage: beeline--force=true
--headerInterval=ROWS
The interval for redisplaying columnheaders, in number of rows, when outputformat is table.Default is 100.
Usage: beeline --headerInterval=50
(Not supported for Separated-Value Outputformats. See HIVE-9770)
--help
Display a usage message.Usage: beeline --help
--hiveconf property=value
Use value for the given configurationproperty. Properties that are listed in hive.conf.restricted.list cannot bereset with hiveconf (see Restricted List and Whitelist).
Usage: beeline --hiveconf prop1=value1
Version: 0.13.0 (HIVE-6173)
--hivevar name=value
Hive variable name and value. This is aHive-specific setting in which variables can be setat the session level and referenced in Hivecommands or queries.
Usage: beeline --hivevar var1=value1
--incremental=[true/false]
Print output incrementally.--isolation=LEVEL
Set the transaction isolation level toTRANSACTION_READ_COMMITTEDor TRANSACTION_SERIALIZABLE.
See the "Field Detail" section inthe Java Connection documentation.
Usage: beeline--isolation=TRANSACTION_SERIALIZABLE
--maxColumnWidth=MAXCOLWIDTH
The maximum column width, in characters,when outputformat is table. Default is 15.Usage: beeline --maxColumnWidth=25
--maxWidth=MAXWIDTH
The maximum width to display beforetruncating data, in characters, when outputformat is table.Default is to query the terminal forcurrent width, then fall back to 80.
Usage: beeline --maxWidth=150
--nullemptystring=[true/false]
Use historic behavior of printing null asempty string (true) or use current behavior of printingnull as NULL (false). Default isfalse.
Usage: beeline --nullemptystring=false
Version: 0.13.0 (HIVE-4485)
--numberFormat=[pattern]
Format numbers using a DecimalFormatpattern.Usage: beeline--numberFormat="#,###,##0.00"
--outputformat=[table/vertical/csv/tsv/dsv/csv2/tsv2]
Format mode for result display. Default istable. See Separated-Value Output Formats below for description of recommendedsv options.Usage: beeline --outputformat=tsv
Version: dsv/csv2/tsv2 added in 0.14.0 (HIVE-8615)
--showHeader=[true/false]
Show column names in query results (true)or not (false). Default is true.Usage: beeline --showHeader=false
--showNestedErrs=[true/false]
Display nested errors. Default isfalse.Usage: beeline --showNestedErrs=true
--showWarnings=[true/false]
Display warnings that are reported on theconnection after issuing any HiveQL commands.Default is false.
Usage: beeline --showWarnings=true
--silent=[true/false]
Reduce the amount of informational messagesdisplayed (true) or not (false). It also stops displaying the log messages forthe query from HiveServer2 (Hive 0.14 and later). Default is false.Usage: beeline --silent=true
--truncateTable=[true/false]
If true, truncates table column in theconsole when it exceeds console length.Version: 0.14.0 (HIVE-6928)
--verbose=[true/false]
Show verbose error messages and debuginformation (true) or do not show (false).Default is false.
Usage: beeline --verbose=true
-d <driver class>
The driver class to use.Usage: beeline -d driver_class
-e <query>
Query that should be executed. Double orsingle quotes enclose the query string. This option can be specified multipletimes.Usage: beeline -e"query_string"
Icon
Only a single command per -e option issupported. You can't provide multiple semicolon separated commands. Use the -eoption multiple times if you want to achieve this.
Bug fix (null pointer exception): 0.13.0(HIVE-5765)
Bug to be fixed (running -e in background):workaround available (HIVE-6758)
Bug fix (--headerInterval not honored):0.14.0 (HIVE-7647)
-f <file>
Script file that should be executed.Usage: beeline -f filepath
Version: 0.12.0 (HIVE-4268)
Note: If the script contains tabs, querycompilation fails in version 0.12.0. This bug is fixed in version 0.13.0(HIVE-6359).
Bug to be fixed (running -f in background):workaround available (HIVE-6758)
-n <username>
The username to connect as.Usage: beeline -n valid_user
-p <password>
The password to connect as.Usage: beeline -p valid_password
-u <database URL>
The JDBC URL to connect to.Usage: beeline -u db_URL
相关文章推荐
- hive学习笔记1:hive使用基本命令
- hive 学习笔记——表的入门操作和命令
- HIVE学习笔记:HiveServer2Beeline
- Hive学习笔记 --- Hive的Beeline使用
- Linux学习笔记5--Top命令
- Linux学习笔记-shell命令[转帖]
- 写得蛮好的linux学习笔记三-压缩命令(收藏)
- 设计模式学习笔记(十六)——Command命令
- Unix学习笔记2--crontab命令
- latex学习笔记之常用命令
- 设计模式学习笔记(十七)——Command命令模式
- 执行数据库命令Command对象——ADO.NET学习&应用笔记之三
- fvwm学习笔记之命令扩展 by stack
- 写得蛮好的linux学习笔记 [转] 二基本命令
- FreeBSD学习笔记01-基本命令
- Linux学习笔记13--使用mount命令挂载CDROM
- 设计模式学习笔记(十七)——Command命令模式
- Linux学习笔记9--touch命令使用
- DB2常用命令学习笔记
- 写得蛮好的linux学习笔记(一些常用的基本命令)