You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Corbin Hoenes <co...@tynt.com> on 2010/04/02 07:18:37 UTC

pig counters

Elephant Bird has a nice little counter UDF to allow incrementing hadoop counters but I am not exactly sure how to use it from a pig script.  Is it mostly used from a FOREACH statement? 

Re: pig counters

Posted by Dmitriy Ryaboy <dv...@gmail.com>.
It's just a helper -- you call into it from your other udfs to increment
counters.
You can see an example of the usage in LzoJsonLoader, where we keep track of
lines read and json lines decoded.

-Dmitriy

On Thu, Apr 1, 2010 at 10:18 PM, Corbin Hoenes <co...@tynt.com> wrote:

> Elephant Bird has a nice little counter UDF to allow incrementing hadoop
> counters but I am not exactly sure how to use it from a pig script.  Is it
> mostly used from a FOREACH statement?