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 Thu, 26 Jul 2007 13:53:57 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

The comment on the change is:
add some commands

------------------------------------------------------------------------------
  ||Describe ||'''Describe''' command provides information about the columnfamilies in a table.[[BR]][[BR]]~-''DESC
table_name;''-~ ||
  ||Create ||'''Create''' command creates a new table.[[BR]][[BR]]~-''CREATE table_name[[BR]]COLUMNFAMILIES('columnfamily_name1'[,
'columnfamily_name2', ...])[[BR]][LIMIT=limitNumber_of_Version];''-~ ||
  ||Drop ||'''Drop''' command drops columnfamilies in a table or tables.[[BR]][[BR]]~-''DROP
table_name1[, table_name2, ...] or columnfamily_name1[, columnfamily_name2, ...];''-~ ||
+ ||Substitute || '''Substitute''' expression to [A~Z][[BR]][[BR]]~-''X = Matrix(table_name,
columnfamily_name);''-~||
+ ||Store ||'''STORE''' command will store results to specified table. [[BR]][[BR]]~-''A =
Table('movieLog_table'); [[BR]]B = A.Selection('length' > 100); [[BR]]STORE B TO X run_style;''-~
||
  ||Clear ||<99%>'''Clear''' the screen.[[BR]][[BR]]~-''CLEAR;''-~ ||
  ||Exit ||<99%>'''Exit''' from the current shell script.[[BR]][[BR]]~-''EXIT;''-~ ||
  And, Commands to manually manipulate data on more detailed parts.
@@ -51, +53 @@

  = Example Of Hbase Shell Use =
  == Create the table in a HBase ==
  
+ {{{
- ~-''CREATE movieLog_table
+ HBase > CREATE movieLog_table
- [[BR]]COLUMNFAMILIES('year', 'length', 'inColor', 'studioName', 'vote', 'producer')
+     --> COLUMNFAMILIES('year', 'length', 'inColor', 'studioName', 'vote', 'producer')
- [[BR]]LIMIT=1;''-~ 
+     --> LIMIT=1; 
  
- ~-''CREATE movieStar_table
+ HBase > CREATE movieStar_table
- [[BR]]COLUMNFAMILIES('biography', 'filmography', 'gender', 'birthDate')
+     --> COLUMNFAMILIES('biography', 'filmography', 'gender', 'birthDate')
- [[BR]]LIMIT=1;''-~ 
+     --> LIMIT=1;
+ }}}
  
  == Insert data into a table ==
+ {{{
- ~-''INSERT movieLog_table ('year:', 'length:', 'inColor:', 'studioName:', 'vote:user_1',
'producer:')
+ HBase > INSERT movieLog_table ('year:', 'length:', 'inColor:', 'studioName:', 'vote:user_1',
'producer:')
- [[BR]]VALUES ('1977', '124', 'true', 'Fox', '5', 'George Lucas')
+     --> VALUES ('1977', '124', 'true', 'Fox', '5', 'George Lucas')
- [[BR]]WHERE row='Star Wars';''-~ 
+     --> WHERE row='Star Wars';
  
  
- ~-''INSERT movieStar_table ('biography:', 'filmography:Star Wars', 'gender:', 'birthDate:')
+ HBase > INSERT movieStar_table ('biography:', 'filmography:Star Wars', 'gender:', 'birthDate:')
- [[BR]]VALUES ('blah~', 'starring', 'male', 'March 31, 1971')
+     --> VALUES ('blah~', 'starring', 'male', 'March 31, 1971')
- [[BR]]WHERE row='Ewan Gordon Mc.Gregor';''-~ 
+     --> WHERE row='Ewan Gordon Mc.Gregor';''-~ 
- 
+ }}}
  
  == Show all data in a table ==
- ~-''SELECT movieLog_table;''-~ 
+ {{{
+ HBase > SELECT movieLog_table;
+ }}}
  
  ||Row Key ||<-12>Column Families ||
  ||<rowbgcolor="#ececec">title ||<-2> year ||<-2>length ||<-2>inColor
||<-2> studioName ||<-2> vote ||<-2> producer ||
@@ -82, +89 @@

  ||Wayne's World ||year: || 1992 ||length: || 95 ||inColor: || true ||studioName: || Paramount
|| vote:''user_2'' || 3 || producer: || Penelope Spheeris ||
  || || || || || || || || || || vote:''user_3'' || 4 || || ||
  
- ~-''SELECT movieStar_table;''-~
+ {{{
+ HBase > SELECT movieStar_table;
+ }}}
  
  ||Row Key ||<-8>Column Families ||
  ||<rowbgcolor="#ececec">starName ||<-2> biography ||<-2>filmography ||<-2>gender
||<-2> birthDate ||

Mime
View raw message