Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Custom counters from Jython UDF function


Copy link to this message
-
Re: Custom counters from Jython UDF function
Yes - take a look at PigCounterHelper.  Instantiate a variable of this
type, and then you can call the method incrCounter() on it:

_counter = PigCounterHelper()
_counter.incrCounter("Stats","Total sessions",1)

Norbert

On Tue, Jul 30, 2013 at 11:05 AM, Serega Sheypak
<[EMAIL PROTECTED]>wrote:

> Hi, is there any possibility to have counters in Jython UDF?
> It works for Java, but I would like to use Jython.
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB