Examples of TezCounter


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

    @Override
    public Counter getCounter(Enum<?> name) {
        if (context == null) {
            return null;
        }
        TezCounter tezCounter = context.getCounters().findCounter(name);
        return new MRCounter(tezCounter);
    }
View Full Code Here

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

    @Override
    public Counter getCounter(String group, String name) {
        if (context == null) {
            return null;
        }
        TezCounter tezCounter = context.getCounters().getGroup(group).findCounter(name);
        return new MRCounter(tezCounter);
    }
View Full Code Here

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

    @Override
    public boolean incrCounter(Enum<?> name, long delta) {
        if (context == null) {
            return false;
        }
        TezCounter counter = context.getCounters().findCounter(name);
        counter.increment(delta);
        return true;
    }
View Full Code Here

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

    @Override
    public boolean incrCounter(String group, String name, long delta) {
        if (context == null) {
            return false;
        }
        TezCounter counter = context.getCounters().getGroup(group).findCounter(name);
        counter.increment(delta);
        return true;
    }
View Full Code Here

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

            while (grpIt.hasNext()) {
                CounterGroup grp = grpIt.next();
                Iterator<TezCounter> cntIt = grp.iterator();
                Map<String, Long> cntMap = Maps.newHashMap();
                while (cntIt.hasNext()) {
                    TezCounter cnt = cntIt.next();
                    cntMap.put(cnt.getName(), cnt.getValue());
                }
                counters.put(grp.getName(), cntMap);
            }

            if (counters.get(FS_COUNTER_GROUP) != null &&
View Full Code Here

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

    for (TezCounterGroupProto counterGroupProto : proto.getCounterGroupsList()) {
      CounterGroup group = counters.addGroup(counterGroupProto.getName(),
        counterGroupProto.getDisplayName());
      for (TezCounterProto counterProto :
        counterGroupProto.getCountersList()) {
        TezCounter counter = group.findCounter(
          counterProto.getName(),
          counterProto.getDisplayName());
        counter.setValue(counterProto.getValue());
      }
    }
    return counters;
  }
View Full Code Here

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

      groupBuilder.setName(counterGroup.getName());
      groupBuilder.setDisplayName(counterGroup.getDisplayName());
      Iterator<TezCounter> counterIterator = counterGroup.iterator();
      int counterIndex = 0;
      while (counterIterator.hasNext()) {
        TezCounter counter = counterIterator.next();
        TezCounterProto tezCounterProto = TezCounterProto.newBuilder()
          .setName(counter.getName())
          .setDisplayName(counter.getDisplayName())
          .setValue(counter.getValue())
          .build();
        groupBuilder.addCounters(counterIndex, tezCounterProto);
        ++counterIndex;
      }
      builder.addCounterGroups(groupIndex, groupBuilder.build());
View Full Code Here

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

  public void progress() {
    reporter.progress();
  }

  public Counters.Counter getCounter(String group, String name) {
    TezCounter counter = context.getCounters().findCounter(group, name);
    MRCounters.MRCounter mrCounter = null;
    if (counter != null) {
      mrCounter = new MRCounters.MRCounter(counter);
    }
    return mrCounter;
View Full Code Here

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

    }
    return mrCounter;
  }

  public Counters.Counter getCounter(Enum<?> name) {
    TezCounter counter = context.getCounters().findCounter(name);
    MRCounters.MRCounter mrCounter = null;
    if (counter != null) {
      mrCounter = new MRCounters.MRCounter(counter);
    }
    return mrCounter;
View Full Code Here

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

      final long fileLength = fileChunk.getLength();
      onDiskBytes += fileLength;
      LOG.debug("Disk file: " + fileChunk.getPath() + " Length is " + fileLength);

      final Path file = fileChunk.getPath();
      TezCounter counter =
          file.toString().endsWith(Constants.MERGED_OUTPUT_PREFIX) ? null : mergedMapOutputsCounter;

      final long fileOffset = fileChunk.getOffset();
      final boolean preserve = fileChunk.preserveAfterUse();
      diskSegments.add(new Segment(job, fs, file, fileOffset, fileLength, codec, ifileReadAhead,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.