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 Wed, 04 Jul 2007 12:22:33 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

------------------------------------------------------------------------------
   * https://issues.apache.org/jira/browse/HADOOP-1375 
   * Implementation has yet to be started.
+ 
  
  [[TableOfContents(4)]]
  
@@ -64, +65 @@

  ||DELETE ||'''Delete''' command will delete specified rows in table. [[BR]][[BR]]~-''DELETE
table_name[[BR]]WHERE row='row_key'[[BR]][AND column='columnfamily_name:column_key'];''-~
||
  ||SELECT ||<99%>'''Select''' command will retrieves rows from a table.[[BR]][[BR]]~-''SELECT
table_name[[BR]][WHERE row='row_key'][[BR]][AND column='columnfamily_name:column_key'];[[BR]][AND
time='Specified_Timestamp'];[[BR]][LIMIT=Number_of_Version];''-~ ||
  
- == Relational Operatiors ==
+ == Relational Operators ==
  
  ||<bgcolor="#ececec">'''Operator''' ||<bgcolor="#ececec">'''Explanation''' ||
  ||PROJECTION||<99%>'''Projection''' of a relation ~+R+~, It makes a new relation as
the set that is obtained when all tuples(rows) in ~+R+~ are restricted to the set {columnfamily,,1,,,...,columnfamily,,n,,}.[[BR]][[BR]]~-''A
= Table('movieLog_table');[[BR]]B = A.Projection('year','length');''-~||
- ||SELECTION||<99%>'''Selection''' of a relation ~+R+~, It makes a new relation as
the set of specified tuples(rows) of the relation ~+R+~[[BR]][[BR]]~-''A = Table('movieLog_table');[[BR]]B
= A.Selection('length' > 100);''-~||
+ ||SELECTION||<99%>'''Selection''' of a relation ~+R+~, It makes a new relation as
the set of specified tuples(rows) of the relation ~+R+~[[BR]]'''Set Operations''' : ~-''OR,
AND, NOT''-~[[BR]][[BR]]~-''A = Table('movieLog_table');[[BR]]B = A.Selection('length' >
100);[[BR]]C = A.Selection('length' > 100 AND 'year' > 1979);''-~||
  ||PRODUCT||<99%>'''Product''' of relations R and S, It makes a new relation as the
set of all possible combinations of tuples of the two operation relations.[[BR]]'''NOTE'''
that this is the most computationally expensive operator in the relational algebra.||
  ||RENAME||<99%>'''Rename''' r to x, The columnfamily names in the columnfamily-list
replace the columnfamily names of the relation.[[BR]][[BR]]~-''A = Table('movieLog_table');[[BR]]B
= A.Rename('length' = 'movieLength');''-~||
  ||GROUP||<99%>'''Group''' tuples by value of an attribute and apply aggregate function
independently to each group of tuples.[[BR]]'''Aggregate Functions''' : ~-''AVG( attribute
), SUM( attribute ), COUNT( attribute ), MIN( attribute ), MAX( attribute )''-~[[BR]][[BR]]~-''A
= Table('movieLog_table);[[BR]]B = A.Group('studioName', MIN('year'));''-~||
  ||SORT||<99%>'''Sort''' of tuples(rows) of R, ordered according to columnfamilies
on columnfamily-list[[BR]][[BR]]~-''A = Table('movieLog_table');[[BR]]B = A.Sort('length',
'vote');''-~||
  
- ||<bgcolor="#ececec">'''Operator''' ||<bgcolor="#ececec">'''Explanation''' ||
- ||UNION ||<99%>'''Union''' R1∪R2 is a relation that includes all tuples(rows) that
are either in R1 or R2 or in both without duplicate tuples.||
- ||INTERSECTION ||<99%>'''Intersection''' R1∩R2 is a relation that includes only
those tuples(rows) in R1 that also appear in R2.||
- ||DIFFERENCE ||'''Difference''' of R1 and R2, R1 - R2 is a relation that includes all tuples
that are in R1 and not in R2.||
- 
  == Matrix Operators ==
  
+ research in progress..
- ||<bgcolor="#ececec">'''Operation''' ||<bgcolor="#ececec">'''Explanation'''
||
- ||DOUBLEMATRIX||<99%>...||
- ||BOOLEANMATRIX||<99%>...||
- 
- ||<bgcolor="#ececec">'''Functions''' ||<bgcolor="#ececec">'''Explanation'''
||
- ||QR ||<99%>...||
- ||LU||<99%>...||
- ||SVD ||<99%>...||
  
  ----
  = Example Of Hbase Shell Use =
@@ -100, +89 @@

  [[BR]]COLUMNFAMILIES('year', 'length', 'inColor', 'studioName', 'vote', 'producer')
  [[BR]]LIMIT=1;''-~ 
  
+ ~-''CREATE movieStar_table
+ [[BR]]COLUMNFAMILIES('biography', 'filmography', 'gender', 'birthDate')
+ [[BR]]LIMIT=1;''-~ 
+ 
  === Insert data into a table ===
- ~-''INSERT table_name ('year:', 'length:', 'inColor:', 'studioName:', 'vote:user_1', 'producer')
+ ~-''INSERT movieLog_table ('year:', 'length:', 'inColor:', 'studioName:', 'vote:user_1',
'producer')
  [[BR]]VALUES ('1977', '124', 'true', 'Fox', '5', 'George Lucas')
  [[BR]]WHERE row='Star Wars';''-~ 
+ 
+ 
+ ~-''INSERT movieStar_table ('biography:', 'filmography:Star Wars', 'gender:', 'birthDate')
+ [[BR]]VALUES ('blah~', 'starring', 'male', 'March 31, 1971')
+ [[BR]]WHERE row='Ewan Gordon Mc.Gregor';''-~ 
+ 
  
  === Show all data in a table ===
  ~-''SELECT movieLog_table;''-~ 
@@ -117, +116 @@

  ||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;''-~
+ 
+ ||Row Key ||<-8>Column Families ||
+ ||<rowbgcolor="#ececec">starName ||<-2> biography ||<-2>filmography ||<-2>gender
||<-2> birthDate ||
+ ||Ewan Gordon Mc.Gregor ||biography: ||blah~ ||filmography:Star Wars ||starring ||gender:
||male ||birthDate: ||March 31, 1971 ||
+ || || || ||filmography:Emma ||extra || || || || ||
+ ||Kenan Thompson ||biography: ||blah~ ||filmography:Mighty Ducks ||starring ||gender: ||male
||birthDate: ||May 10, 1978 ||
+ || || || ||filmography:Big Fat Liar  ||cameo || || || || ||
+ ||keanu reeves ||biography: ||blah~ ||filmography:Constantine ||starring ||gender: ||male
||birthDate: ||September 2, 1964||
+ || || || ||filmography:The Matrix Reloaded ||starring || || || || ||
  
  == Relation Operations ==
  
@@ -170, +179 @@

  
  == Matrix Operations ==
  
- Lets construct a abstract sparse row-by-column matrix.
+ Lets construct a abstract sparse row-by-column Map Matrix, orientation is row major.
  
  ~-''A = doubleMatrix('movieLog_table','vote');''-~
  
@@ -179, +188 @@

  ||<bgcolor="#ececec">Mighty Ducks || 2.0 ||   || 4.0 ||
  ||<bgcolor="#ececec">Wayne's World ||   || 3.0 || 4.0 ||
  
- 
  ----
  = Matrix Extension Example On Hbase Shell =
  == Latent Semantic Analysis By Singular Value Decomposition ==

Mime
View raw message