how to access Mapper Counter value in a Reducer?

后端 未结 3 1844
臣服心动
臣服心动 2021-02-15 12:16

I want to acces the myCounter.my value in reducer :

public static class Map extends Mapper

        
3条回答
  •  甜味超标
    2021-02-15 12:46

    You can access your counter value in reducer using the same code

    Counter counter = context.getCounter( myCounter.my );
            counter.getValue();
    

    also see

提交回复
热议问题