[
https://issues.apache.org/jira/browse/PIG-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655864#action_12655864
]
Samuel Guo commented on PIG-6:
------------------------------
@Ben
I have a question about your second suggestion.
If I don't implement LoadFunc, I can't cast the UDF(HBaseStorage) to
*LoadFunc*. Then I will get the exception below.
org.apache.pig.backend.hadoop.hbase.HBaseStorage cannot be cast to
org.apache.pig.LoadFunc
java.io.IOException: org.apache.pig.backend.hadoop.hbase.HBaseStorage cannot be
cast to org.apache.pig.LoadFunc
at org.apache.pig.PigServer.parseQuery(PigServer.java:298)
at org.apache.pig.PigServer.registerQuery(PigServer.java:263)
at org.apache.pig.PigServer.registerQuery(PigServer.java:349)
at
org.apache.pig.test.TestHBaseStorage.testLoadFromHBase(TestHBaseStorage.java:125)
Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException:
org.apache.pig.backend.hadoop.hbase.HBaseStorage cannot be cast to
org.apache.pig.LoadFunc
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.NonEvalFuncSpec(QueryParser.java:4271)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.LoadClause(QueryParser.java:1063)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:883)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:742)
at
org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:537)
at
org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60)
at org.apache.pig.PigServer.parseQuery(PigServer.java:295)
It seems that we only accept four types of UDF in pig-latin: EVALFUNC,
COMPARISONFUNC, LOADFUNC, STOREFUNC. Am I right?
Can you explain more about your second suggestion? Thanks in advanced.
> Addition of Hbase Storage Option In Load/Store Statement
> --------------------------------------------------------
>
> Key: PIG-6
> URL: https://issues.apache.org/jira/browse/PIG-6
> Project: Pig
> Issue Type: New Feature
> Environment: all environments
> Reporter: Edward J. Yoon
> Attachments: hbase-0.18.1-test.jar, hbase-0.18.1.jar, PIG-6.patch
>
>
> It needs to be able to load full table in hbase. (maybe ... difficult? i'm
> not sure yet.)
> Also, as described below,
> It needs to compose an abstract 2d-table only with certain data filtered from
> hbase array structure using arbitrary query-delimited.
> {code}
> A = LOAD table('hbase_table');
> or
> B = LOAD table('hbase_table') Using HbaseQuery('Query-delimited by attributes
> & timestamp') as (f1, f2[, f3]);
> {code}
> Once test is done on my local machines,
> I will clarify the grammars and give you more examples to help you explain
> more storage options.
> Any advice welcome.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.