crunch-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkatesh kavuluri <>
Subject call DoFn#increment from helper class
Date Fri, 13 Feb 2015 00:12:46 GMT
Hi All,

I am trying to figure out the best way to call increment method (for
counters) from a helper class invoked from DoFn#process.

I have something like this.

class A extends DoFn<> {

Foo foo = nee Foo(); // helper class

public void process (S input, Emitter<T> emitter) {
    foo.processAndEmitEvents(bar, emitter);

I want to call DoFn#increment method from Foo#processAndEmitEvents. Is
there a better way to go about it other than “Foo" extending “A” just to
get hold of DoFn#increment.

Thanks for the help.

View raw message