[
https://issues.apache.org/jira/browse/HADOOP-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546432
]
stack commented on HADOOP-1608:
-------------------------------
Edward:
I committed the patch (Sorry it took so long). it basically works but there
are some issues. Please file new JIRAs to fix.
'show table;' doesn't work ('table' is keyword in shell looks like).
I think you should peg the shell version same as rest of hadoop/hbase. Lets
figure a way to get the version string into the shell preamble.
The below selection is not working properly. I would expect the result table
to have nothing but one row with a cell value of 'g' -- not all content of
source table.
{code}
hql > select * from y;
+-------------------------+-------------------------+-------------------------+
| Row | Column | Cell |
+-------------------------+-------------------------+-------------------------+
| x | x: | g |
+-------------------------+-------------------------+-------------------------+
| x | y: | e |
+-------------------------+-------------------------+-------------------------+
| x | z: | f |
+-------------------------+-------------------------+-------------------------+
3 row(s) in set (0.04 sec)
hql > show a;
a = table(y);
hql > b = a.selection(x = 'g');
hql > save b into table('e');
07/11/28 12:51:21 INFO jvm.JvmMetrics: Cannot initialize JVM Metrics with
processName=JobTracker, sessionId= - already initialized
07/11/28 12:51:31 INFO jvm.JvmMetrics: Cannot initialize JVM Metrics with
processName=JobTracker, sessionId= - already initialized
07/11/28 12:51:31 WARN mapred.JobClient: No job jar file set. User classes may
not be found. See JobConf(Class) or JobConf#setJar(String).
07/11/28 12:51:32 INFO mapred.MapTask: numReduceTasks: 1
07/11/28 12:51:32 INFO mapred.LocalJobRunner:
07/11/28 12:51:32 INFO mapred.TaskRunner: Task 'map_0000' done.
07/11/28 12:51:32 INFO mapred.LocalJobRunner: reduce > reduce
07/11/28 12:51:32 INFO mapred.TaskRunner: Task 'reduce_8stpva' done.
Successfully complete.
hql > select * from g;
'g' Table not found
hql > select * from e;
+-------------------------+-------------------------+-------------------------+
| Row | Column | Cell |
+-------------------------+-------------------------+-------------------------+
| x | x: | g |
+-------------------------+-------------------------+-------------------------+
| x | y: | e |
+-------------------------+-------------------------+-------------------------+
| x | z: | f |
+-------------------------+-------------------------+-------------------------+
3 row(s) in set (0.03 sec)
{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
> Assignee: 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, patch_v10.txt, patch_v11.txt, patch_v12.txt, patch_v13.txt,
> patch_v14.txt, patch_v15.txt, patch_v16.txt, patch_v17.txt, patch_v18.txt,
> patch_v19.txt, patch_v20.txt, patch_v21.txt, patch_v22.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;
> or Result = R1.join(R1.actor:hero = R2.Row) and R2;
> or Result = R1.join(R1.actor:hero = R2.Row and R1.studioName = 'Fox' and
> R2.occupation = 'singer') and R2;
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.