Package org.apache.tez.common.counters

Examples of org.apache.tez.common.counters.CounterGroup


    @Override
    public void initialize(ProcessorContext processorContext)
            throws ExecException {
        if (isMultiStore()) {
            CounterGroup multiStoreGroup = processorContext.getCounters()
                    .getGroup(MRPigStatsUtil.MULTI_STORE_COUNTER_GROUP);
            if (multiStoreGroup == null) {
                processorContext.getCounters().addGroup(
                        MRPigStatsUtil.MULTI_STORE_COUNTER_GROUP,
                        MRPigStatsUtil.MULTI_STORE_COUNTER_GROUP);
            }
            String name = MRPigStatsUtil.getMultiStoreCounterName(this);
            if (name != null) {
                outputRecordCounter = multiStoreGroup.addCounter(name, name, 0);
            }
        }
    }
View Full Code Here


    }

  @Override
  protected long getCounterValue( TezCounters counterGroups, String groupName, String counterName )
    {
    CounterGroup counterGroup = counterGroups.getGroup( groupName );

    if( counterGroup == null )
      return 0;

    TezCounter counterValue = counterGroup.findCounter( counterName );

    if( counterValue == null )
      return 0;

    return counterValue.getValue();
View Full Code Here

TOP

Related Classes of org.apache.tez.common.counters.CounterGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.