Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Document HIVE-5252

...

Command

Description

quit
exit

Use quit or exit to leave the interactive shell.

reset

Resets the configuration to the default values (as of Hive 0.10: see HIVE-3202).

set <key>=<value>

Sets the value of a particular configuration variable (key).
Note: If you misspell the variable name, the CLI will not show an error.

set

Prints a list of configuration variables that are overridden by the user or Hive.

set -v

Prints all Hadoop and Hive configuration variables.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="88d2b12b53a95a79-f97c1c1a-4320465c-bbd08ee0-2f2e7ee7ef99f5edd0678527"><ac:plain-text-body><![CDATA[

add FILE[S] <filepath> <filepath>*
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ca7bb5ea016ab0be-19031e60-41e44858-a1669740-610fdb51ff1ff93002604d5b"><ac:plain-text-body><![CDATA[add JAR[S] <filepath> <filepath>*
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0149008031ec7306-93f2780e-4b034f2f-9ae6859a-9c7205971be074b6596d32b0"><ac:plain-text-body><![CDATA[add ARCHIVE[S] <filepath> <filepath>*

Adds one or more files, jars, or archives to the list of resources in the distributed cache.

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8484ac96ca35c990-2a1a8f5b-4ab74f06-bf0186cc-f316c678edea65904782b79c"><ac:plain-text-body><![CDATA[

list FILE[S]
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="480455a25b2058f3-98eaaafb-420c41b6-9c169b04-cc739b2bbcab979dcfeffa0b"><ac:plain-text-body><![CDATA[list JAR[S]
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c404255ce2e0de62-a250bc06-4f72416b-ada9980c-caddd2687e6945f5672a64ab"><ac:plain-text-body><![CDATA[list ARCHIVE[S]

Lists the resources already added to the distributed cache.

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="915459aeea776420-9cc8e88d-4fd1477b-9ed1ac2f-8158ddeb1dbbaef1562df926"><ac:plain-text-body><![CDATA[

list FILE[S] <filepath>*
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1d05100db6495f38-6c9824b5-44fe4eaa-8234a585-c21c072206dca06e836b90b8"><ac:plain-text-body><![CDATA[list JAR[S] <filepath>*
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ca74d9f7613ebd20-aa73b7eb-4aa54a0c-a588a9d1-7da03c0bc0e1a8ba33135161"><ac:plain-text-body><![CDATA[list ARCHIVE[S] <filepath>*

Checks whether the given resources are already added to the distributed cache or not.

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ad592c89c9129ba4-44d417a2-44d94bf2-90d0890a-d800dc6bfeb05dcedbf90a14"><ac:plain-text-body><![CDATA[

delete FILE[S] <filepath>*
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f644395e8b67ebec-9c4b46f9-455a4c2b-930e8163-f217cb3ce236742d196bf1d6"><ac:plain-text-body><![CDATA[delete JAR[S] <filepath>*
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="cfd08a7363d901b5-c136ac09-45d54383-aca8953a-801a71e95810852bcbe0bdc5"><ac:plain-text-body><![CDATA[delete ARCHIVE[S] <filepath>*

Removes the resource(s) from the distributed cache.

]]></ac:plain-text-body></ac:structured-macro>

! <command>

Executes a shell command from the Hive shell.

dfs <dfs command>

Executes a dfs command from the Hive shell.

<query string>

Executes a Hive query and prints results to standard output.

source FILE <filepath>

Executes a script file inside the CLI.

compile `<groovy string>` AS GROOVY NAMED <name>

This allows inline Groovy code to be compiled and be used as a UDF (as of Hive 0.13.0)

Sample Usage:

No Format
  hive> set mapred.reduce.tasks=32;
  hive> set;
  hive> select a.* from tab1;
  hive> !ls;
  hive> dfs -ls;