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

@Override
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.

Reply via email to