Commands are non-SQL statement such as setting a property or adding a resource. They can be used in HiveQL scripts or directly in the CLI.
Command |
Description |
||
---|---|---|---|
quit |
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). |
||
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="a5eb77b3-8649-4f96-8867-1acac288bf85"><ac:plain-text-body><![CDATA[ |
add FILE[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="1e2f97f7-fda4-43b5-8c7c-908464665eec"><ac:plain-text-body><![CDATA[ |
list FILE[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="e504fa46-1529-495e-8ade-657666c048c0"><ac:plain-text-body><![CDATA[ |
list FILE[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="5e3f814d-20a4-4f65-80e6-05d697aca2ef"><ac:plain-text-body><![CDATA[ |
delete FILE[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. |
Sample Usage:
hive> set mapred.reduce.tasks=32; hive> set; hive> select a.* from tab1; hive> !ls; hive> dfs -ls;