hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/LanguageManual/LanguageManual/Cli" by suresh antony
Date Thu, 22 Jan 2009 01:12:12 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by suresh antony:
http://wiki.apache.org/hadoop/Hive/LanguageManual/LanguageManual/Cli

------------------------------------------------------------------------------
  
  == Hive Command line Options ==
  
+ Usage:
  
+ {{{
- Usage: hive [-hiveconf x=y]* [<-f filename>|<-e query-string>] [-S]
+   Usage: hive [-hiveconf x=y]* [<-f filename>|<-e query-string>] [-S]
  
    -e 'quoted query string'  Sql from command line
    -f <filename>             Sql from file
    -S                        Silent mode in interactive shell
-   -hiveconf x=y             Use this to set hive/hadoop configuration variables. Hive variables
are documented [[here]]
+   -hiveconf x=y             Use this to set hive/hadoop configuration variables. 
    
- 
- -e and -f cannot be specified together. In the absence of these
+    -e and -f cannot be specified together. In the absence of these options, interactive
shell is started
- options, interactive shell is started
+ }}}
  
   * Example of running Query from command line
+    {{{
-    * $HIVE_HOME/bin/hive -e 'select a.col from tab1 a'
+    $HIVE_HOME/bin/hive -e 'select a.col from tab1 a'
+    }}}
   * Example of setting hive configuration variables
+    {{{
-    *  $HIVE_HOME/bin/hive -e 'select a.col from tab1 a' -hiveconf hive.exec.scratchdir=/home/my/hive_scratch
 -hiveconf mapred.reduce.tasks=32
+    $HIVE_HOME/bin/hive -e 'select a.col from tab1 a' -hiveconf hive.exec.scratchdir=/home/my/hive_scratch
 -hiveconf mapred.reduce.tasks=32
+    }}}
  
  
  == Hive interactive Shell Command  ==
  
  When  $HIVE_HOME/bin/hive  ran without  any -e/-f option it goes into interactive shell
mode. 
  
-  * hive> quit;
-    * Use quit or exit to come out of interactive shell.
  
+ ||'''Command '''||'''Description'''||
+ ||quit||Use quit or exit to come out of interactive shell.||
-  
-  * hive> set; 
-    * This will print list of configuration variables that overriden by user or hive. 
-  * hive> set -v;
-    * This will give all possible hadoop/hive configuration variables.
-  * hive> set <key>=<value>;
-    * Use this set value of particular parameter. One thing to note here is that if you miss
spell the variable name, there cli will not show an error.
+ ||set <key>=<value>||Use this set value of particular parameter. One thing to
note here is that if you miss spell the variable name, there cli will not show an error.||
-  * hive> set key;
-    * Use this check the value of particular variable.
+ ||set||This will print list of configuration variables that overriden by user or hive.||
+ ||set -v||This will give all possible hadoop/hive configuration variables.||
+ ||add FILE <value> <value>*||Adds a file to the list of resources.||
+ ||list FILE||list all the resources already added||
+ ||list FILE <value>*||Check given resources are already added or not.||
+ ||! <cmd>||execute a shell command from hive shell||
+ ||dfs <dfs command>||execute dfs command command from hive shell||
+ || <query string> ||executes hive query and prints results to stdout||
  
+ Sample Usage:
+ {{{
+   hive> set  mapred.reduce.tasks=32;
+   hive> set;
+   hive> select a.* from tab1;
+   hive> !ls;
+   hive> dfs -ls;
+ }}}
-  * hive> add FILE <value> <value>*;
-    * Adds a file to the list of resources. 
-  * hive> list FILE;
-    * list all the resources already added.
-  * hive> list FILE <value>*;
-    * Check given resources are already added or not.
- 
-  * hive> ! <cmd>;
-    * execute a shell command from hive shell
- 
-  * hive> dfs <dfs command>;
-    * execute dfs command command from hive shell.
- 
-  * hive> <query string> ;
-    * executes hive query and prints results to stdout.
- 
  === Hive Resources ===
  You can add a file to list of resources using 'add FILE <file>'. This could be a local
file or nfs file.
  Once files is added to the list of  resources, hive query could access this file from any
where in the cluster. Otherwise location of 

Mime
View raw message