hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-hadoop Wiki] Trivial Update of "Hbase/HbaseShell" by udanax
Date Tue, 15 Jan 2008 12:38:16 GMT
Dear Wiki user,

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

The following page has been changed by udanax:
http://wiki.apache.org/lucene-hadoop/Hbase/HbaseShell

------------------------------------------------------------------------------
  
  All commands are terminated with a semi-colon: e.g. Type 'help;' to see list of available
commands.
  
- = HQL(Hbase Query Language) Commands =
+ = HQL =
+ 
+ == HQL Client API ==
+ {{{#!java
+   HQLClient hql = new HQLClient(conf, MASTER_ADDRESS);
+   ReturnMsg rs = hql.executeQuery(queryStr);
+ 
+   System.out.println(rs.getMsg());
+ }}}
  
  '''Note''' that attribute values are quoted with either single or double quotes.
  
- == Basic Query Commands ==
- === Basic administration commands ===
+ == Query Grammars ==
+ === Database administration language ===
- ||<bgcolor="#ececec">'''Command''' ||<bgcolor="#ececec">'''Explanation''' ||
+ ||<bgcolor="#ececec">'''syntax''' ||<bgcolor="#ececec">'''Explanation''' ||
- ||Help ||<99%>'''Help''' command provides information about the use of shell script.[[BR]][[BR]]~-''HELP
[function_name];''-~ ||
+ ||Help ||<99%>'''Help''' syntax provides information about the use of shell script.[[BR]][[BR]]~-''HELP
[function_name];''-~ ||
- ||Show ||<99%>'''Show''' command lists tables.[[BR]][[BR]]~-''SHOW tables;''-~ ||
+ ||Show ||<99%>'''Show''' syntax lists tables.[[BR]][[BR]]~-''SHOW tables;''-~ ||
- ||Describe ||'''Describe''' command provides information about the columnfamilies in a table.[[BR]][[BR]]~-''DESC
table_name;''-~ ||
+ ||Describe ||'''Describe''' syntax provides information about the columnfamilies in a table.[[BR]][[BR]]~-''DESC
table_name;''-~ ||
  ||FS ||<99%>'''Filesystem''' commands.[[BR]][[BR]]~-''FS [-option] arguments...;''-~
||
- ||JAR ||<99%>'''JAR''' command to run hadoop jar commands.[[BR]][[BR]]~-''JAR jarFile
[mainClass] args...;''-~||
+ ||JAR ||<99%>'''JAR''' syntax to run hadoop jar commands.[[BR]][[BR]]~-''JAR jarFile
[mainClass] args...;''-~||
  ||Clear ||<99%>'''Clear''' the screen.[[BR]][[BR]]~-''CLEAR;''-~ ||
  ||Exit ||<99%>'''Exit''' from the current shell script.[[BR]][[BR]]~-''EXIT;''-~ ||
  
- === Data definition commands ===
+ === Data definition language ===
- Data definition commands to define data tables
+ Data definition langague to define data tables
  
- ||<bgcolor="#ececec">'''Command''' ||<bgcolor="#ececec">'''Explanation''' ||
+ ||<bgcolor="#ececec">'''Syntax''' ||<bgcolor="#ececec">'''Explanation''' ||
- ||Create ||<99%>'''Create''' command creates a new table.[[BR]][[BR]]~-''CREATE TABLE
table_name ([[BR]]{{{    }}}column_family_definition[[BR]]{{{    }}}[, column_family_spec][[BR]]{{{
   }}}...[[BR]])[[BR]][[BR]]''-~'''colum_family_definition:'''~-''[[BR]]column_family_name[[BR]]{{{
 }}}[MAX_VERSIONS=n][[BR]]{{{    }}}[MAX_LENGTH=n][[BR]]{{{    }}}[COMPRESSION=NONE|BLOCK|RECORD][[BR]]{{{
   }}}[IN_MEMORY][[BR]]{{{    }}}[BLOOMFILTER=NONE|BLOOMFILTER|COUNTING_BLOOMFILTER|RETOUCHED_BLOOMFILTER
VECTOR_SIZE=n NUM_HASH=n]''-~ ||
+ ||Create ||<99%>'''Create''' syntax creates a new table.[[BR]][[BR]]~-''CREATE TABLE
table_name ([[BR]]{{{    }}}column_family_definition[[BR]]{{{    }}}[, column_family_spec][[BR]]{{{
   }}}...[[BR]])[[BR]][[BR]]''-~'''colum_family_definition:'''~-''[[BR]]column_family_name[[BR]]{{{
 }}}[MAX_VERSIONS=n][[BR]]{{{    }}}[MAX_LENGTH=n][[BR]]{{{    }}}[COMPRESSION=NONE|BLOCK|RECORD][[BR]]{{{
   }}}[IN_MEMORY][[BR]]{{{    }}}[BLOOMFILTER=NONE|BLOOMFILTER|COUNTING_BLOOMFILTER|RETOUCHED_BLOOMFILTER
VECTOR_SIZE=n NUM_HASH=n]''-~ ||
- ||Alter ||<99%>'''Alter''' command changes the structure of the specified table.[[BR]][[BR]]~-''ALTER
TABLE table_name[[BR]]{{{    }}}alter_definition [, alter_definition] ...[[BR]][[BR]]''-~'''alter_definition:'''~-''[[BR]]{{{
    }}}ADD column_family_definition[[BR]]{{{    }}}| ADD (column_family_definition, ...)[[BR]]{{{
   }}}| DROP column_family_name[[BR]]{{{    }}}| CHANGE column_family_name column_family_definition''-~||
+ ||Alter ||<99%>'''Alter''' syntax changes the structure of the specified table.[[BR]][[BR]]~-''ALTER
TABLE table_name[[BR]]{{{    }}}alter_definition [, alter_definition] ...[[BR]][[BR]]''-~'''alter_definition:'''~-''[[BR]]{{{
    }}}ADD column_family_definition[[BR]]{{{    }}}| ADD (column_family_definition, ...)[[BR]]{{{
   }}}| DROP column_family_name[[BR]]{{{    }}}| CHANGE column_family_name column_family_definition''-~||
- ||Drop ||'''Drop''' command drops columnfamilies in a table or tables.[[BR]][[BR]]~-''DROP
TABLE table_name1[, table_name2, ...];''-~ ||
+ ||Drop ||'''Drop''' syntax drops columnfamilies in a table or tables.[[BR]][[BR]]~-''DROP
TABLE table_name1[, table_name2, ...];''-~ ||
- ||Truncate ||'''Truncate''' command cleans all data from a table. [[BR]][[BR]]~-''TRUNCATE
TABLE table_name;''-~ ||
+ ||Truncate ||'''Truncate''' Syntax cleans all data from a table. [[BR]][[BR]]~-''TRUNCATE
TABLE table_name;''-~ ||
  
- === Data manipulation commands ===
+ === Data manipulation language ===
- Data manipulation commands to manually manipulate data on more detailed parts
+ Data manipulation language to manually manipulate data on more detailed parts
  
- ||<bgcolor="#ececec">'''Command''' ||<bgcolor="#ececec">'''Explanation''' ||
+ ||<bgcolor="#ececec">'''Syntax''' ||<bgcolor="#ececec">'''Explanation''' ||
- ||Insert ||<99%>'''Insert''' command inserts one row into the table with a value for
specified column in the table.[[BR]][[BR]]~-''INSERT INTO table_name (colmn_name, ...)[[BR]]{{{
   }}}VALUES ('value', ...)[[BR]]{{{    }}}WHERE row = 'row-key'[[BR]]{{{    }}}[TIMESTAMP
'timestamp'];''-~ ||
+ ||Insert ||<99%>'''Insert''' syntax inserts one row into the table with a value for
specified column in the table.[[BR]][[BR]]~-''INSERT INTO table_name (colmn_name, ...)[[BR]]{{{
   }}}VALUES ('value', ...)[[BR]]{{{    }}}WHERE row = 'row-key'[[BR]]{{{    }}}[TIMESTAMP
'timestamp'];''-~ ||
- ||Delete ||'''Delete''' command deletes 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'];''-~ ||
+ ||Delete ||'''Delete''' syntax deletes 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''' command 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''-~ ||
+ ||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''-~ ||
  
- == Example Of HQL(Hbase Query Command) Uses ==
+ == Example Of HQL Uses ==
  === Create the table in a Hbase ===
  
  {{{

Mime
View raw message