Impala-Shell常用操作命令
一、外部Shell
选项 描述
-h, --help 显示帮助信息
-v or --version 显示版本信息
-i hostname, --impalad=hostname 指定连接运行 impalad 守护进程的主机。默认端口是 21000。
-q query, --query=query 从命令行中传递一个shell 命令。执行完这一语句后 shell 会立即退出。
-f query_file, --query_file= query_file 传递一个文件中的 SQL 查询。文件内容必须以分号分隔
-o filename or --output_file filename 保存所有查询结果到指定的文件。通常用于保存在命令行使用 -q 选项执行单个查询时的查询结果。
-c 查询执行失败时继续执行
-d default_db or --database=default_db 指定启动后使用的数据库,与建立连接后使用use语句选择数据库作用相同,如果没有指定,那么使用default数据库
-r or --refresh_after_connect 建立连接后刷新 Impala 元数据
-p, --show_profiles 对 shell 中执行的每一个查询,显示其查询执行计划
-B(--delimited) 去格式化输出
--output_delimiter=character 指定分隔符
--print_header 打印列名
impala-shell -h:
[root@ai-etl-c2-13 ~]# impala-shell -h
Usage: impala_shell.py [options]Options:-h, --help show this help message and exit-i IMPALAD, --impalad=IMPALAD<host:port> of impalad to connect to[default: ai-etl-c2-13:21000]-b KERBEROS_HOST_FQDN, --kerberos_host_fqdn=KERBEROS_HOST_FQDNIf set, overrides the expected hostname of theImpalad's kerberos service principal. impala-shellwill check that the server's principal matches thishostname. This may be used when impalad is configuredto be accessed via a load-balancer, but it is desiredfor impala-shell to talk to a specific impaladdirectly. [default: none]-q QUERY, --query=QUERYExecute a query without the shell [default: none]-f QUERY_FILE, --query_file=QUERY_FILEExecute the queries in the query file, delimited by ;.If the argument to -f is "-", then queries are readfrom stdin and terminated with ctrl-d. [default: none]-k, --kerberos Connect to a kerberized impalad [default: False]-o OUTPUT_FILE, --output_file=OUTPUT_FILEIf set, query results are written to the given file.Results from multiple semicolon-terminated querieswill be appended to the same file [default: none]-B, --delimited Output rows in delimited mode [default: False]--print_header Print column names in delimited mode when pretty-printed. [default: False]--output_delimiter=OUTPUT_DELIMITERField delimiter to use for output in delimited mode[default: \t]-s KERBEROS_SERVICE_NAME, --kerberos_service_name=KERBEROS_SERVICE_NAMEService name of a kerberized impalad [default: impala]-V, --verbose Verbose output [default: True]-p, --show_profiles Always display query profiles after execution[default: False]--quiet Disable verbose output [default: False]-v, --version Print version information [default: False]-c, --ignore_query_failureContinue on query failure [default: False]-d DEFAULT_DB, --database=DEFAULT_DBIssues a use database command on startup[default: none]-l, --ldap Use LDAP to authenticate with Impala. Impala must beconfigured to allow LDAP authentication.[default: False]-u USER, --user=USER User to authenticate with. [default: root]--ssl Connect to Impala via SSL-secured connection[default: False]--ca_cert=CA_CERT Full path to certificate file used to authenticateImpala's SSL certificate. May either be a copy ofImpala's certificate (for self-signed certs) or thecertificate of a trusted third-party CA. If not set,but SSL is enabled, the shell will NOT verify Impala'sserver certificate [default: none]--config_file=CONFIG_FILESpecify the configuration file to load options. Thefollowing sections are used: [impala],[impala.query_options]. Section names are casesensitive. Specifying this option within a config filewill have no effect. Only specify this as an option inthe commandline. [default: /root/.impalarc]--history_file=HISTORY_FILEThe file in which to store shell history. This mayalso be configured using the IMPALA_HISTFILEenvironment variable. [default: ~/.impalahistory]--live_summary Print a query summary every 1s while the query isrunning. [default: False]--live_progress Print a query progress every 1s while the query isrunning. [default: False]--auth_creds_ok_in_clearIf set, LDAP authentication may be used with aninsecure connection to Impala. WARNING: Authenticationcredentials will therefore be sent unencrypted, andmay be vulnerable to attack. [default: none]--ldap_password_cmd=LDAP_PASSWORD_CMDShell command to run to retrieve the LDAP password[default: none]--var=KEYVAL Defines a variable to be used within the Impalasession. Can be used multiple times to set differentvariables. It must follow the pattern "KEY=VALUE", KEYstarts with an alphabetic character and containsalphanumeric characters or underscores. [default:none]-Q QUERY_OPTIONS, --query_option=QUERY_OPTIONSSets the default for a query option. Can be usedmultiple times to set different query options. It mustfollow the pattern "KEY=VALUE", KEY must be a validquery option. Valid query options can be listed bycommand 'set'. [default: none]-t CLIENT_CONNECT_TIMEOUT_MS, --client_connect_timeout_ms=CLIENT_CONNECT_TIMEOUT_MSTimeout in milliseconds after which impala-shell willtime out if it fails to connect to Impala server. Setto 0 to disable any timeout. [default: 60000]
二、内部Shell
选项 描述
help 显示帮助信息
explain <sql> 显示执行计划
profile (查询完成后执行) 查询最近一次查询的底层信息
shell <shell> 不退出impala-shell执行shell命令
version 显示版本信息(同于impala-shell -v)
connect 连接impalad主机,默认端口21000(同于impala-shell -i)
refresh <tablename> 增量刷新元数据库
invalidate metadata 全量刷新元数据库(慎用)(同于 impala-shell -r)
history 历史命令
[root@ai-etl-c2-13 ~]# impala-shell :help
[root@ai-etl-c2-13 ~]# impala-shell
Starting Impala Shell without Kerberos authentication
Opened TCP connection to ai-etl-c2-13:21000
Connected to ai-etl-c2-13:21000
Server version: impalad version 3.2.0-cdh6.3.0 RELEASE (build 495397101e5807c701df71ea288f4815d69c2c8a)
***********************************************************************************
Welcome to the Impala shell.
(Impala Shell v3.2.0-cdh6.3.0 (4953971) built on Thu Jul 18 10:24:11 PDT 2019)When pretty-printing is disabled, you can use the '--output_delimiter' flag to set
the delimiter for fields in the same row. The default is '\t'.
***********************************************************************************
[ai-etl-c2-13:21000] default> help;Documented commands (type help <topic>):
========================================
compute exit history rerun shell unset version
connect explain profile select show use with
describe help quit set tip valuesUndocumented commands:
======================
alter delete drop load src update
create desc insert source summary upsert[ai-etl-c2-13:21000] default>
Impala-Shell常用操作命令相关推荐
- Impala Shell常用命令行选项与常用命令
常用命令行选项 -h或–help 显示帮助信息. [root@node2 ~]# impala-shell -h -i或–impalad 连接到指定的impalad节点. [root@node2 ~] ...
- 01 HBase基本概念和hbase shell常用命令用法
本文转载自:http://archive.cnblogs.com/a/2178064/ 1. 简介 HBase是一个分布式的.面向列的开源数据库,源于google的一篇论文<bigtable:一 ...
- HBase基本概念和hbase shell常用命令用法
1. 简介 HBase是一个分布式的.面向列的开源数据库,源于google的一篇论文<bigtable:一个结构化数据的分布式存储系统>.HBase是Google Bigtable的开源实 ...
- Apache Kudu 与 Impala Shell 的结合使用文档(创建表、删、改、查)
Kudu与Apache Impala紧密集成,允许您在Impala使用Impala的SQL语法从Kudu去做 插入,查询,更新和删除数据,作为使用Kudu API 构建自定义Kudu应用程序的替代方法 ...
- Hbase数据库的常用操作命令
HBase的使用 1.自带了shell命令行 $ bin/hbase shell 2.输入help获取帮助信息 3.shell命令行的删除,需要按住ctrl+删除键才可以删除 4.list列出当前数据 ...
- PostgreSQL常用操作命令常见错误
PostgreSQL常用操作命令 登录数据库shell命令行 语法:psql -U User [[-d] DB] 不指定DB时默认登录用户名相同的DB psql -U postgres -d post ...
- W10系统matlab无法保存对该路径的更改 pathdef_Linux系统常用操作命令整理 - SimonShixinlong...
1.查看linux版本:cat /proc/version 2.查看Linux版本: uname --all 3.查看php版本:php -v 查看PHP扩展库: php -m 查看MySQL版本: ...
- Linux shell常用操作指令(0)
首先,说一下我跟Linux的接触的历史吧!第一次接触是在大一下学期的3月份,当时我参加了一个科创学习,接触到了有小型计算机之称的树莓派,在那段时间跟随老师从一开始的给树莓派烧录镜像到树莓派的一些基本配 ...
- k8s之常用操作命令(还在补充ing,先看着吧)
k8s之常用操作命令(还在补充ing,先看着吧) 像小编这样,依靠百度的日子是真不好受,有时候领导催的时候,你就是想不起来这个命令,百度的时候也出不来,就是难受,全都是玄学的,那怎么办呢,好办自己整一 ...
- 安装虚拟机及Linux常用操作命令
一.实验环境 Windows10 ,VMware Workstation 12.1.1 ,Ubuntu kylin 16.04 二.实验内容与完成情况 1.新建用户Hadoop (1)安装时新建 (2 ...
最新文章
- 异常:”未处理System.TypeLoadException“
- 华三交换机升级的ipe文件_弱电工程工业以太网交换机电源故障总结
- 《机电传动控制》学习笔记10-1
- Python中的Numpy模块(1,numpy创建)
- html里table的遍历,js遍历table中的tr
- oracle删除本地文件权限,使用 UNIX 权限保护文件
- 计算机网络第七版总结报告,计算机网络(第七版)第一章总结(超详细!)
- POJ3259-负权回路判定
- 打不开baidu晓得、百科等可是其他网页正常的解决方法
- linux命令——locate
- 官方AI语音系统电销机器人系统搭建|AI智能|电话机器人源码|2022最新电销外呼系统《各版本机器人部署》
- 经纬度坐标格式批量转换
- 2019届高三理科数学选择填空整理
- java写pdf中文不显示_java – iText pdf在使用NOTO字体或Source Hans时不显示中文字符...
- ICCV2019 |论文阅读——SCRDet:Towards More Robust Detection for Small, Cluttered and Rotated Objects
- 过压电路保护元器件详解,一文就看明白了
- InputStream读取数据
- 网络丢包问题的原因及解决办法
- 树莓派3B/4B从零开始编译安装并刷入OpenWrt,让空闲的树莓派变成路由器
- 今天这教程难度有点高,反爬虫之跳过淘宝滑块验证!爬虫必会教程