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] Trivial Update of "Hbase/HbaseShell/HQL" by udanax
Date Sun, 10 Feb 2008 02:26:41 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 udanax:
http://wiki.apache.org/hadoop/Hbase/HbaseShell/HQL

------------------------------------------------------------------------------
    /* Initializes  a hql client object */
    HQLClient hql = HQLClient(...);
    
-   /* !ResultSet object to hold the result of query */
+   /* ResultSet object to hold the result of query */
-   !ReulstSet rs = null;
+   ReulstSet rs = null;
  
    /* execute the hql and put the results in the ResultSet object*/
    rs = hql.executeQuery("query");
@@ -31, +31 @@

  
  ''Why not go whole way and implement the [http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html
java.sql.ResultSet] interface, etc.?  Would it fit? St.Ack''
  
- == External HQL Query file ==
+ == External HQL command file ==
- HQL Query file is used for construct schema, table, and column references. It'll be created
using table dump (or manually), and can be fed into Hbase to re-create the tables. 
- 
+ === Purpose ===
+ To run the specified command file.
+ === Syntax ===
  {{{
- hql > load query file 'hdfs://hbase/script.hql';
+   hql > @ 'hdfs://hbase/file.txt' [arg...];
+ }}}
+ === Applications ===
+ {{{
+   map {
+     rs = hql.executeQuery("@ '" + cmdFilePath + "';");
+     output.collect(key, rs.result());
+   }
  }}}
  
+ ''A file of data definition shouldn't be called a 'query file' -- and why can't the file
just as easily load data?  Can you think of something else to call it?  And its possible to
do "$ cat DATA_DEFINITION_FILE|./bin/hbase shell" to get the same effect? St.Ack''
  
- ''A file of data definition shouldn't be called a 'query file' -- and why can't the file
just as easily load data?  Can you think of something else to call it?  And its possible to
do "$ cat DATA_DEFINITION_FILE|./bin/hbase shell" to get the same effect? St.Ack''
  == Parallel Execution Features ==
  
  === Query ===

Mime
View raw message