Impala - impala-shell help命令行参数详解

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: master:21000]
  -q QUERY, --query=QUERY
                        Execute a query without the shell [default: none]
  -f QUERY_FILE, --query_file=QUERY_FILE
                        Execute the queries in the query file, delimited by ;.
                        If the argument to -f is "-", then queries are read
                        from stdin and terminated with ctrl-d. [default: none]
  -k, --kerberos        Connect to a kerberized impalad [default: False]
  -o OUTPUT_FILE, --output_file=OUTPUT_FILE
                        If set, query results are written to the given file.
                        Results from multiple semicolon-terminated queries
                        will 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_DELIMITER
                        Field delimiter to use for output in delimited mode
                        [default: \t]
  -s KERBEROS_SERVICE_NAME, --kerberos_service_name=KERBEROS_SERVICE_NAME
                        Service 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_failure
                        Continue on query failure [default: False]
  -r, --refresh_after_connect
                        Refresh Impala catalog after connecting
                        [default: False]
  -d DEFAULT_DB, --database=DEFAULT_DB
                        Issues a use database command on startup
                        [default: none]
  -l, --ldap            Use LDAP to authenticate with Impala. Impala must be
                        configured 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 authenticate
                        Impala's SSL certificate. May either be a copy of
                        Impala's certificate (for self-signed certs) or the
                        certificate of a trusted third-party CA. If not set,
                        but SSL is enabled, the shell will NOT verify Impala's
                        server certificate [default: none]
  --config_file=CONFIG_FILE
                        Specify the configuration file to load options. The
                        following sections are used: [impala],
                        [impala.query_options]. Section names are case
                        sensitive. Specifying this option within a config file
                        will have no effect. Only specify this as an option in
                        the commandline. [default: /home/xxxx/.impalarc]
  --live_summary        Print a query summary every 1s while the query is
                        running. [default: False]
  --live_progress       Print a query progress every 1s while the query is
                        running. [default: False]
  --auth_creds_ok_in_clear
                        If set, LDAP authentication may be used with an
                        insecure connection to Impala. WARNING: Authentication
                        credentials will therefore be sent unencrypted, and
                        may be vulnerable to attack. [default: none]
  --ldap_password_cmd=LDAP_PASSWORD_CMD
                        Shell command to run to retrieve the LDAP password
                        [default: none]
  --var=KEYVAL          Defines a variable to be used within the Impala
                        session. Can be used multiple times to set different
                        variables. It must follow the pattern "KEY=VALUE", KEY
                        starts with an alphabetic character and contains
                        alphanumeric characters or underscores. [default:
                        none]
  -Q QUERY_OPTIONS, --query_option=QUERY_OPTIONS
                        Sets the default for a query option. Can be used
                        multiple times to set different query options. It must
                        follow the pattern "KEY=VALUE", KEY must be a valid
                        query option. Valid query options  can be listed by
                        command 'set'. [default: none]

参数详细说明:

参数:Options

注释

说明

-h, --help

show this help message and exit

帮助文档

-i IMPALAD, --impalad=IMPALAD

host:port> of impalad to connect to [host: master:21000]

指定impala连接的主机和端口

-q QUERY, --query=QUERY

Execute a query without the shell [default: none]

指定查询语句

-f QUERY_FILE, --query_file=QUERY_FILE

Execute the queries in the query file, delimited by ;.

If the argument to -f is "-", then queries are read from stdin and terminated with ctrl-d. [default: none]

指定要执行的sql文件

-k, --kerberos

Connect to a kerberized impalad [default: False]

通过kerberos认证进入impala

-o OUTPUT_FILE, --output_file=OUTPUT_FILE

If set, query results are written to the given file. Results from multiple semicolon-terminated queries will 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_DELIMITER

Field delimiter to use for output in delimited mode [default: \t]

指定输出文件的分隔符

-s KERBEROS_SERVICE_NAME, --kerberos_service_name=KERBEROS_SERVICE_NAME

Service name of a kerberized impalad [default: impala]

指定kerberos的服务名称,默认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]

打印impala版本

-c, --ignore_query_failure

Continue on query failure [default: False]

查询失败时继续

-r, --refresh_after_connect

Refresh Impala catalog after connecting [default: False]

连接后刷新

-d DEFAULT_DB, --database=DEFAULT_DB

Issues a use database command on startup [default: none]

指定连接后的默认数据库

-l, --ldap

Use LDAP to authenticate with Impala. Impala must be configured to allow LDAP authentication. [default: False]

启用LDAP身份验证

-u USER, --user=USER

User to authenticate with. [default: root]

指定用户

--ssl

Connect to Impala via SSL-secured connection [default: False]

通过SSL安全连接连接到Impala

--ca_cert=CA_CERT

Full path to certificate file used to authenticate Impala's SSL certificate. May either be a copy of Impala's certificate (for self-signed certs) or the certificate of a trusted third-party CA. If not set, but SSL is enabled, the shell will NOT verify Impala's server certificate [default: none]

验证Impala的SSL证书的证书文件的完整路径。

--config_file=CONFIG_FILE

Specify the configuration file to load options. The following sections are used: [impala], [impala.query_options]. Section names are case sensitive. Specifying this option within a config file will have no effect. Only specify this as an option in the commandline. [default: /home/xxxx/.impalarc]

指定要加载选项的配置文件。

--live_summary

Print a query summary every 1s while the query is running. [default: False]

打印查询信息 (仅用于交互模式)

--live_progress

Print a query progress every 1s while the query is running. [default: False]

打印查询进度 (仅用于交互模式)

--auth_creds_ok_in_clear

If set, LDAP authentication may be used with an insecure connection to Impala. WARNING: Authentication credentials will therefore be sent unencrypted, and may be vulnerable to attack. [default: none]

如果设置了LDAP身份验证,则可能会与到Impala的不安全连接一起使用。

--ldap_password_cmd=LDAP_PASSWORD_CMD

Shell command to run to retrieve the LDAP password [default: none]

运行以检索LDAP密码的Shell命令

--var=KEYVAL

Defines a variable to be used within the Impala session. Can be used multiple times to set different variables. It must follow the pattern "KEY=VALUE", KEY starts with an alphabetic character and contains alphanumeric characters or underscores. [default: none]

指定查询的变量,以key=value模式输入,可多次设置不同变量。

-Q QUERY_OPTIONS, --query_option=QUERY_OPTIONS

Sets the default for a query option. Can be used multiple times to set different query options. It must follow the pattern "KEY=VALUE", KEY must be a valid query option. Valid query options can be listed by command 'set'. [default: none]

设置查询选项的默认值指定内存等(mem_limit=32g)

更多设置请参考

说明:

--live_summary:打印查询信息

--live_progress:打印查询进度

这两个参数只适用于交互模式下,即命令行模式下

 

参考资料-官方文档

参考资料-查询参数设置

おすすめ

転載: blog.csdn.net/qq_24256877/article/details/108487518
おすすめ