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

------------------------------------------------------------------------------
  == Initial Contributor ==
  
   * [:udanax:Edward Yoon] (R&D center, NHN corp.)
- 
- == Index ==
- 
- [[TableOfContents(3)]]
   
- ----
  == How to Start a Shell ==
  
  Run the following on the command-line:
@@ -28, +23 @@

  All commands are terminated with a semi-colon: e.g. Type 'help;' to see list 
of available commands.
  
  = HQL =
+ ==  Table of Contents ==
  
- == HQL Client API ==
- {{{#!java
-   HQLClient hql = new HQLClient(conf, MASTER_ADDRESS);
-   ReturnMsg rs = hql.executeQuery(queryStr);
+ {{{ }}}1. [#QueryGrammars Query Grammars] [[BR]]
+ {{{    }}}1.1 [#DAL Database administration language] [[BR]]
+ {{{    }}}1.2 [#DDL Data definition language] [[BR]]
+ {{{    }}}1.3 [#DML Data manipulation language] [[BR]]
+ {{{ }}}2. [#SQLvsHQL Comparison table between SQL and HQL] [[BR]] 
+ {{{    }}}2.1 [#devList Under Development List] [[BR]]
+ {{{ }}}3. [#Example Example Of HQL Uses] [[BR]]
+ {{{    }}}3.1 [#Create Create the table in a Hbase] [[BR]]
+ {{{    }}}3.2 [#Select Select data from a table] [[BR]]
+ {{{    }}}3.3 [#Insert Insert data into a table] [[BR]]
+ {{{    }}}3.4 [#Delete Delete data in a table] [[BR]]
+ {{{    }}}3.5 [#Jar How to use external jars in Hbase Shell] [[BR]]
  
+ [[Anchor(QueryGrammars)]]
-   System.out.println(rs.getMsg());
- }}}
- 
  == Query Grammars ==
  '''Note''' that attribute values are quoted with either single or double 
quotes.
+ [[Anchor(DAL)]]
  === Database administration language ===
  ||<bgcolor="#ececec">'''Syntax''' ||<bgcolor="#ececec">'''Explanation''' ||
  ||Help ||<99%>'''Help''' provides information about the use of shell 
script.[[BR]][[BR]]~-''HELP [function_name];''-~ ||
@@ -50, +53 @@

  ||Clear ||<99%>'''Clear''' the screen.[[BR]][[BR]]~-''CLEAR;''-~ ||
  ||Exit ||<99%>'''Exit''' from the current shell 
script.[[BR]][[BR]]~-''EXIT;''-~ ||
  
+ [[Anchor(DDL)]]
  === Data definition language ===
  Data definition langague to define data tables
  
@@ -59, +63 @@

  ||Drop ||'''Drop''' columnfamilies in a table or tables.[[BR]][[BR]]~-''DROP 
TABLE table_name1[, table_name2, ...];''-~ ||
  ||Truncate ||'''Truncate''' cleans all data from a table. 
[[BR]][[BR]]~-''TRUNCATE TABLE table_name;''-~ ||
  
+ [[Anchor(DML)]]
  === Data manipulation language ===
  Data manipulation language to manually manipulate data on more detailed parts
  
@@ -67, +72 @@

  ||Delete ||'''Delete''' specified rows in table. [[BR]][[BR]]~-''DELETE { 
column_name, [, column_name] ... | COLUMNFAMILIES(column_family[, 
column_family] ... | *} [[BR]]{{{    }}}FROM table_name[[BR]]{{{    }}}[WHERE 
row = 'row-key'];''-~ ||
  ||Select ||<99%>'''Select''' syntax retrieves rows from a table.[[BR]]Several 
aggregate operators: COUNT()[[BR]][[BR]]~-''SELECT { column_name [, 
column_name] ... | expr[alias] | * }[[BR]]{{{    }}}FROM table_name[[BR]]{{{    
}}}[WHERE row = 'row-key' | STARTING FROM 'row-key' [UNTIL 
'stop-key']][[BR]]{{{    }}}[NUM_VERSIONS = version_count][[BR]]{{{    
}}}[TIMESTAMP 'timestamp'][[BR]]{{{    }}}[LIMIT = row_count][[BR]]{{{    
}}}[INTO FILE 'file_name'][[BR]][[BR]]''-~'''column_name:'''~-''[[BR]]{{{     
}}}column_family_name[[BR]]{{{    }}}| column_family_name:column_label_name''-~ 
||
  
+ [[Anchor(SQLvsHQL)]]
  == Comparison table between SQL and HQL ==
  
  ||<bgcolor="#ececec">'''SQL''' ||<bgcolor="#ececec">'''HQL 0.0.2'''||
@@ -88, +94 @@

  ||'''Update Statement'''[[BR]]UPDATE "table_name"[[BR]]SET "column_1" = [new 
value][[BR]]WHERE {condition} ||X ||
  ||'''Delete From Statement'''[[BR]]DELETE FROM "table_name"[[BR]]WHERE 
{condition} ||O ||
  
+ [[Anchor(devList)]]
  === Under Development List ===
  
  If you find need of something that has not been implemented, please send a 
request to [:udanax:me] or [https://issues.apache.org/jira JIRA]
  
   * Delete Command
  
+ [[Anchor(Example)]]
  == Example Of HQL Uses ==
+ [[Anchor(Create)]]
  === Create the table in a Hbase ===
  
  {{{
@@ -132, +141 @@

    --> vector_size=1000000 num_hash=4);
  }}}
  
+ [[Anchor(Select)]]
  === Select data from a table ===
  {{{
  hql > help select;
@@ -167, +177 @@

  hql > SELECT count(studioName:Fox) FROM movieLog_table;
  }}}
  
+ [[Anchor(Insert)]]
  === Insert data into a table ===
  {{{
  hql > help insert;
@@ -193, +204 @@

    --> WHERE row='Star Wars';
  }}}
  
+ [[Anchor(Delete)]]
  === Delete data in a table ===
  {{{
  hql > help delete;
@@ -214, +226 @@

  hql > DELETE * FROM movieLog_table;
  }}}
  
+ [[Anchor(Jar)]]
  === How to use external jars in Hbase Shell ===
  
  {{{

Reply via email to