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="da4ec74fda4526b7-4c45c53e-44d94595-b59fb606-1c106ece94d32a8b6c6b9466"><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="63fc68407aa28089-dde28fcf-4be740bd-9661b8fe-22872cda5b2079b0cdfb41c6"><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="3faf549a4b45c2a0-ee32287a-46164bf5-90ad87fd-68e16fa4f6e4be241bf8ed5d"><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="659d23fe561ba8e8-cdcc5cff-4ae74035-85fb81c6-fcfaa61f285a1b250ddddb61"><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="e7efcec19438ab28-ab04bd49-400c4e99-9612825c-3465a2b14c10cab3fce89c5a"><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="c042679397b25d64-148b4a63-429a40bd-a759b265-f5347131dfeffd49211a9050"><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="0a5a6dfce84f4adc-7f6e6a4f-4cf2472d-a5c99d73-cfe588c9deb17d92f33c9ea3"><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="fcf69f88599b1e6b-ade48098-443c411f-8885a569-e31dfd93d107f5222cae9c5f"><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="e551002ac228fe44-a296abc8-4c684464-83c4b41e-f06d5a91a96d750ee6e2657e"><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="0c5856883115bb47-9ad9d01e-462b45e0-bd82a8e1-6a2b667e84a1c03b03139bac"><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="a2a42e4ae3f751be-b9fc609e-40d447a1-8dccace8-4a99d585aaf5a61db4d700ad"><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="5ce7d71d0e977283-aa71919e-4fe34033-9310ad89-bb6dd8079a5c17396b4bbe45"><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;