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/ShellPlans" by udanax
Date Fri, 26 Oct 2007 07:13:39 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

------------------------------------------------------------------------------
    * selects a subset of the columnfamilies of a relation
    * Result = π ,,column_list,, (Relation) 
  {{{
+ +---------------------------------------------------+
-   title         year   length  inColor studioName  
+ | title         year   length  inColor studioName   |
-   =================================================
+ | ================================================= |
-   Star Wars     1977   124     true    Fox        
+ | Star Wars     1977   124     true    Fox          |
-   Mighty Ducks  1991   104     true    Paramount  
+ | Mighty Ducks  1991   104     true    Paramount    |
+ +---------------------------------------------------+
  
  Hbase > Result = Relation.Projection('year','legnth');
  Hbase > save Result into table('result');
  
+ +------------------------------+
-   title         year   length 
+ | title         year   length  |
-   ============================
+ | ============================ |
-   Star Wars     1977   124    
+ | Star Wars     1977   124     |
-   Mighty Ducks  1991   104    
+ | Mighty Ducks  1991   104     |
- 
+ +------------------------------+
  }}}
   * Selection
    * selects a subset of the rows in a relation that satisfy a selection condition
    * Result = σ ,,selection_condition,, (Relation) 
  {{{
+ +---------------------------------------------------+
-   title         year   length  inColor studioName  
+ | title         year   length  inColor studioName   |
-   =================================================
+ | ================================================= |
-   Star Wars     1977   124     true    Fox        
+ | Star Wars     1977   124     true    Fox          |
-   Mighty Ducks  1991   104     true    Paramount  
+ | 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', 'Paramound'));
  Hbase > save Result into table('result');
  
+ +---------------------------------------------------+
-   title         year   length  inColor studioName  
+ | title         year   length  inColor studioName   |
-   =================================================
+ | ================================================= |
-   Star Wars     1977   124     true    Fox        
+ | Star Wars     1977   124     true    Fox          |
+ +---------------------------------------------------+
  }}}
  
   * Group 
@@ -60, +67 @@

    * Result = R1 ▷◁ ,,θ join_condition,, R2
  {{{
  R1
- 
+ +----------------------------------------------------------------------------------------+
-   title         year   length  inColor producer      actor                             
studioName
+ | title         producer      actor                              studioName            
 |
-   ==================================================================================================
+ | ======================================================================================
|
-   Star Wars     1977   124     true    George Lucas                                    
Fox
+ | Star Wars     George Lucas                                     Fox                   
 |
-   Mighty Ducks  1991   104     true    Blair Peters  actor:hero      <Charles Adler>
   Paramount 
+ | Mighty Ducks  Blair Peters  actor:hero      <Charles Adler>    Paramount       
       |
-                                                      actor:cameo     <Someone>
+ |                             actor:cameo     <Someone>                          
       |
-   The Bodyguard 1992   114     true    Mick Jackson  actor:hero      <Kevin Costner>
   Warner Home Video 
+ | The Bodyguard Mick Jackson  actor:hero      <Kevin Costner>    Warner Home Video
      |
-                                                      actor:heroine   <Whitney Houston>
+ |                             actor:heroine   <Whitney Houston>                  
       |
+ +----------------------------------------------------------------------------------------+
  
  R2
- 
+ +---------------------------------------------------------+
-   name              occupation   birth         knownFor
+ | name              occupation   birth         knownFor   |
-   ======================================================================
+ | ======================================================= |
-   Whitney Houston   Singer       Aug 9, 1963   Diva and cautionary tale
+ | 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 = 'Fox' and R2.occupation
= 'Singer');
+      or Result = R1.join(R1.actor:heroine = R2.Row and R1.studioName = 'Warner Home Video'
and R2.occupation = 'Singer');
  
- 
+ Result
+ +-------------------------------------------------------------------------------------------------------------------+
-   title         year   length  inColor producer      actor                             
studioName        occupation  birth       ...
+ | title         producer      actor                            studioName         occupation
 birth       knownFor  |               
-   =================================================================================================================================
+ | =================================================================================================================
|
-   The Bodyguard 1992   114     true    Mick Jackson  actor:heroine   <Whitney Houston>
 Warner Home Video Singer      Aug 9, 1963 ...
+ | The Bodyguard Mick Jackson  actor:heroine <Whitney Houston>  Warner Home Video 
Singer      Aug 9, 1963 Diva      |
-    
+ +-------------------------------------------------------------------------------------------------------------------+
  
  }}}
  
  === Linear Algebra Operations ===

Mime
View raw message