You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Edward Yoon (JIRA)" <ji...@apache.org> on 2007/10/10 10:13:50 UTC
[jira] Issue Comment Edited: (HADOOP-1608) [Hbase Shell] Relational
Algrebra Operators
[ https://issues.apache.org/jira/browse/HADOOP-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12533598 ]
udanax edited comment on HADOOP-1608 at 10/10/07 1:12 AM:
---------------------------------------------------------------
* added 'JOIN' operation. more details will be handled in HADOOP-2021 issue.
{code}
Hbase > a = table('movieLog_table');
Hbase > b = table('personInfo_table');
Hbase > c = a.Join(a.producer: = b.ROW) and b;
Hbase > save c into table('joinedTable');
Hbase > d = a.Join(a.actor:hero = b.ROW) and b;
Hbase > save d into table('heroActors_movieInfo');
Hbase > select * from joinedTable;
+-------------------------+-------------------------+-------------------------+
| Row | Column | Cell |
+-------------------------+-------------------------+-------------------------+
| Star Wars | birth: | May 14, 1944 |
+-------------------------+-------------------------+-------------------------+
| Star Wars | inColor: | true |
+-------------------------+-------------------------+-------------------------+
| Star Wars | length: | 124 |
+-------------------------+-------------------------+-------------------------+
| Star Wars | producer: | George Lucas |
+-------------------------+-------------------------+-------------------------+
| Star Wars | studioName: | Fox |
+-------------------------+-------------------------+-------------------------+
| Star Wars | vote:user | 5 |
+-------------------------+-------------------------+-------------------------+
| Star Wars | vote:user 0 | 2 |
+-------------------------+-------------------------+-------------------------+
| Star Wars | year: | 1977 |
+-------------------------+-------------------------+-------------------------+
{code}
was (Author: udanax):
* added 'JOIN' operation. more details will be handled in HADOOP-2013 issue.
{code}
Hbase > a = table('movieLog_table');
Hbase > b = table('personInfo_table');
Hbase > c = a.Join(a.producer: = b.ROW) and b;
Hbase > save c into table('joinedTable');
Hbase > d = a.Join(a.actor:hero = b.ROW) and b;
Hbase > save d into table('heroActors_movieInfo');
Hbase > select * from joinedTable;
+-------------------------+-------------------------+-------------------------+
| Row | Column | Cell |
+-------------------------+-------------------------+-------------------------+
| Star Wars | birth: | May 14, 1944 |
+-------------------------+-------------------------+-------------------------+
| Star Wars | inColor: | true |
+-------------------------+-------------------------+-------------------------+
| Star Wars | length: | 124 |
+-------------------------+-------------------------+-------------------------+
| Star Wars | producer: | George Lucas |
+-------------------------+-------------------------+-------------------------+
| Star Wars | studioName: | Fox |
+-------------------------+-------------------------+-------------------------+
| Star Wars | vote:user | 5 |
+-------------------------+-------------------------+-------------------------+
| Star Wars | vote:user 0 | 2 |
+-------------------------+-------------------------+-------------------------+
| Star Wars | year: | 1977 |
+-------------------------+-------------------------+-------------------------+
{code}
> [Hbase Shell] Relational Algrebra Operators
> -------------------------------------------
>
> Key: HADOOP-1608
> URL: https://issues.apache.org/jira/browse/HADOOP-1608
> Project: Hadoop
> Issue Type: Improvement
> Components: contrib/hbase
> Affects Versions: 0.14.1
> Environment: All environments
> Reporter: Edward Yoon
> Priority: Minor
> Fix For: 0.16.0
>
> Attachments: patch_v01.txt, patch_v02.txt, patch_v03.txt, patch_v04.txt, patch_v05.txt, patch_v06.txt, patch_v07.txt, patch_v08.txt, patch_v09.txt
>
>
> Development of relational algebra operators has begun.
> * Projection
> ** selects a subset of the columnfamilies of a relation
> ** Result = π ~column_list~ (Relation)
> {code}
> Hbase > Result = Relation.Projection('year','legnth');
> Hbase > save Result into table('result');
> {code}
> * Selection
> ** See : HADOOP-2003 issue's description
> {code}
> Hbase > Result = Relation.Selection(length > 100 and studioName = 'Fox');
> Hbase > save Result into table('result');
> {code}
> * Group
> ** more details about 'GROUP' operation will be handled in HADOOP-1658 issue.
> * θ Join
> ** 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
> {code}
> Hbase > R1 = table('movieLog_table');
> Hbase > R2 = table('personInfo_table');
> Hbase > Result = R1.join(R1.producer = R2.ROW) and R2;
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.