Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Access context from UDF


Copy link to this message
-
Re: Access context from UDF
Navis류승우 2013-06-14, 02:36
If VCs are not on query, it'll not be made in ExecMapper from start.

If you can do something with Reporter instance in MR,
https://issues.apache.org/jira/browse/HIVE-3628 would be helpful.

2013/5/30 Peter Marron <[EMAIL PROTECTED]>:
> Hi,
>
>
>
> Using Hive 0.10.0 over Hadoop 1.0.4.
>
>
>
> I guess that I know that this is a long shot.
>
> Is there any way to access the context from inside a UDF?
>
> Specifically I want to get hold of the value of the virtual
>
> column BLOCK__OFFSET__INSIDE__FILE from inside a
>
> UDF that I’m implementing. Of course I can pass it in as
>
> a parameter but it would be nice if I didn’t have to.
>
> So is there some way I can interrogate the value of this column?
>
> Or, seeing as I can, that the value of the virtual column
>
> is set using the value of
>
>                 ctx.getIoCxt().getCurrentBlockStart();
>
> where ctx is an ExecMapperContext
>
> is there some way that I can get hold of this
>
> directly? Can the UDF get hold of the ExecMapperContext?
>
>
>
> Thanks in advance.
>
>
>
> Z
>
>
>
>