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

Switch to Plain View
Pig, mail # user - EvalFunc#outputSchema method not called in UDF


+
Zhang Jianfeng 2012-08-15, 01:04
+
=?KOI8-U?B?96bUwcymyiD0yc... 2012-08-15, 20:12
+
Jonathan Coveney 2012-08-15, 21:10
+
=?KOI8-U?B?96bUwcymyiD0yc... 2012-08-16, 09:20
Copy link to this message
-
Re: EvalFunc#outputSchema method not called in UDF
Jonathan Coveney 2012-08-16, 16:59
Just checked -- it's just in trunk.

2012/8/16 Віталій Тим��ишин <[EMAIL PROTECTED]>

> In 0.9.2 I don't see getInputSchema, so it must be quite fresh :)
>
> 2012/8/16 Jonathan Coveney <[EMAIL PROTECTED]>
>
> > Indeed, this is the case. outputSchema is only called when the job is
> being
> > created on the client side, not on the job side.
> >
> > In the newer EvalFunc (not sure what version it was introduced in, but 7
> is
> > quite old at this point), there is a public getInputSchema() method which
> > will return the input schema to the EvalFunc, and you can just call
> > outputSchema to get the outputSchema. So this exists :)
> > 2012/8/15 Віталій Тимчишин <[EMAIL PROTECTED]>
> >
> > > As far as I could see, it's being called only on planning, not on
> > > execution. It's a pity and I've thought to open enhancement Jira
> ticket.
> > >
> > > Середа, 15 серп��я 2012 р. користув��ч Zhang Jianfeng <
> [EMAIL PROTECTED]
> > >
> > > написав:
> > > > Hello everyone,
> > > >
> > > >    I am coding one pig UDF function, like MyUDF:
> > > >
> > > >    public class MyUDF extends EvalFunc<Object>{
> > > >
> > > >        public Object exec(Tuple input) throws IOException()
> > > >        public Schema outputSchema(Schema input){}
> > > >    }
> > > >
> > > > But I found the outputSchema method never called in jobs.  I use the
> > 0.7
> > > > pig. Does anyone know why this happens?
> > > >
> > > > Any thoughts will be appreciated.
> > > >
> > > > Thanks,
> > > > Jian Feng
> > > >
> > >
> > > --
> > > Best regards,
> > >  Vitalii Tymchyshyn
> > >
> >
>
>
>
> --
> Best regards,
>  Vitalii Tymchyshyn
>