There are couple of differences:
* JobContext is a hadoop concept, UDFContext is a Pig concept
* JobContext is per Map-reduce job, UDFContext is per Pig store

Usually you store some per store settings inside UDFContext, and retrieve it later.

Properties p = UDFContext.getUDFContext().getUDFProperties(this.getClass());
p.setProperty("someproperty", value);

You do not use JobContext directly in Pig.

Daniel


-----Original Message----- From: Jae Lee
Sent: Saturday, December 04, 2010 4:11 AM
To: [email protected]
Subject: What's the difference between JobContext, UDFContext?

Hi,

What's the difference between JobContext and UDFContext? and when should I use one or the other?

thanks

J=

Reply via email to