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] Update of "Hbase/HbaseShell/ShellPlans" by udanax
Date Sat, 17 Nov 2007 00:55:12 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/ShellPlans

------------------------------------------------------------------------------
  [[TableOfContents(4)]]
  
  = Hbase Shell Commands Plans =
- 
- == Hbase Shell Algebraic Commands ==
- 
- ||<bgcolor="#E5E5E5">'''Command''' ||<bgcolor="#E5E5E5">'''Explanation''' ||
- ||Table ||<99%>'''Table''' command loads specified table. [[BR]][[BR]]~-''Table('table_name');''-~
||
- ||Substitute ||<99%>'''Substitute''' specific algebraic expression to specified string[[BR]][[BR]]~-''A
= Projection(column-list);''-~ ||
- ||Save ||<99%>'''Save''' command will save results to specified table or matrix. [[BR]][[BR]]~-''A
= Table('table_name'); [[BR]]B = A.Selection(condition_expression); [[BR]]Save B Into table(result_table);''-~
||
- 
- === Relational Algebra ===
- 
-  * https://issues.apache.org/jira/browse/HADOOP-1608 (Vote up if you want it!!)
- ==== Projection ====
-  * selects a subset of the columnfamilies of a relation
-  * Result = π ,,column_list,, (Relation) 
- {{{
- Relation
- +---------------------------------------------------+
- | title         year   length  inColor studioName   |
- | ================================================= |
- | Star Wars     1977   124     true    Fox          |
- | Mighty Ducks  1991   104     true    Paramount    |
- +---------------------------------------------------+
- 
- Hbase > Result = Relation.Projection('year','legnth');
- Hbase > save Result into table('result');
- 
- Result
- +------------------------------+
- | title         year   length  |
- | ============================ |
- | Star Wars     1977   124     |
- | Mighty Ducks  1991   104     |
- +------------------------------+
- }}}
- ==== Selection ====
-  * selects a subset of the rows in a relation that satisfy a selection condition
-  * Result = σ ,,selection_condition,, (Relation) 
- {{{
- Relation
- +---------------------------------------------------+
- | title         year   length  inColor studioName   |
- | ================================================= |
- | Star Wars     1977   124     true    Fox          |
- | Mighty Ducks  1991   104     true    Paramount    |
- +---------------------------------------------------+
- 
- Hbase > Result = Relation.Selection(length > 100 and studioName = 'Fox'); 
-      or Result = Relation.Selection(length > 100 and studioName NOT IN ('Fox', 'Paramount'));
- Hbase > save Result into table('result');
- 
- Result
- +---------------------------------------------------+
- | title         year   length  inColor studioName   |
- | ================================================= |
- | Star Wars     1977   124     true    Fox          |
- +---------------------------------------------------+
- }}}
- 
- ==== Group ====
-  * http://issues.apache.org/jira/browse/HADOOP-1658 (Vote up if you want it!!)
-  * Aggregation functions on collections of data values: average, minimum, maximum, sum,
count.
-  * Group rows by value of an columnfamily and apply aggregate function independently to
each group of rows.
-  * <Grouping columnfamilies> ƒ ,,function_list,, (Relation) 
- {{{
- Hbase > Group Relation by (studioName, SUM('vote:user'));
- }}}
- 
- ==== θ Join ====
-  * http://issues.apache.org/jira/browse/HADOOP-2021 (Vote up if you want it!!)
-  * The join of two relations R1(A,,1,, ,A,,2,, ,...,A,,n,,) and R2(B,,1,, ,B,,2,, ,...,B,,m,,)
is a relation with degree k=n+m and attributes (A,,1,, ,A,,2,, ,...,A,,n,, , B,,1,, ,B,,2,,
,...,B,,m,,) that satisfy the join condition 
-   * Result = R1 ▷◁ ,,θ join_condition,, R2
- {{{
- R1
- +----------------------------------------------------------------------------------------+
- | title         producer      actor                              studioName            
 |
- | ======================================================================================
|
- | Star Wars     George Lucas                                     Fox                   
 |
- | Mighty Ducks  Blair Peters  actor:hero      <Charles Adler>    Paramount       
       |
- |                             actor:cameo     <Someone>                          
       |
- | The Bodyguard Mick Jackson  actor:hero      <Kevin Costner>    Warner Home Video
      |
- |                             actor:heroine   <Whitney Houston>                  
       |
- +----------------------------------------------------------------------------------------+
- 
- R2
- +---------------------------------------------------------+
- | name              occupation   birth         knownFor   |
- | ======================================================= |
- | Whitney Houston   Singer       Aug 9, 1963   Diva       |
- +---------------------------------------------------------+
- 
- Hbase > R1 = table('movieLog_table');
- Hbase > R2 = table('personInfo_table');
- Hbase > Result = R1.join(R1.producer: = R2.ROW) and R2; 
-      or Result = R1.join(R1.actor:hero = R2.Row) and R2;
-      or Result = R1.join(R1.actor:heroine = R2.Row and R1.studioName = 'Warner Home Video'
and R2.occupation = 'Singer') and R2;
- 
- Result
- +-------------------------------------------------------------------------------------------------------------------+
- | title         producer      actor                            studioName         occupation
 birth       knownFor  |
- | =================================================================================================================
|
- | The Bodyguard Mick Jackson  actor:heroine <Whitney Houston>  Warner Home Video 
Singer      Aug 9, 1963 Diva      |
- +-------------------------------------------------------------------------------------------------------------------+
- }}}
- 
- ==== Query mixture examples ====
- 
- {{{
- Relation
- +---------------------------------------------------+
- | title         year   length  inColor studioName   |
- | ================================================= |
- | Star Wars     1977   124     true    Fox          |
- | Mighty Ducks  1991   104     true    Paramount    |
- +---------------------------------------------------+
- 
- Hbase > Proj = Relation.Projection('year','legnth');
- Hbase > Result = Proj.Selection(length > 120);
- Hbase > save Result into table('result');
- 
- Result
- +------------------------------+
- | title         year   length  |
- | ============================ |
- | Star Wars     1977   124     |
- +------------------------------+
- }}}
  
  === Linear Algebra ===
   * Proof of concept implementation for hbase-based Matrix Computing

Mime
View raw message