Examples of Counter


Examples of org.apache.airavata.wsmg.util.Counter

    private Counter storeToOutQueueCounter;

    public OutGoingQueue() {
        if (WSMGParameter.measureMessageRate) {
            storeToOutQueueCounter = new Counter();
            TimerThread timerThread = new TimerThread(storeToOutQueueCounter, " StoreToOutQueueCounter");
            new Thread(timerThread).start();
        }
    }
View Full Code Here

Examples of org.apache.axis2.util.Counter

        }
       
        wsdlDefinition = def;
        wsdlURL = wURL;

        accessCount = new Counter();

        releaseResources();
    }
View Full Code Here

Examples of org.apache.drill.exec.cache.Counter

    }
  }

  @Override
  public Counter getCounter(String name) {
    Counter c = counters.get(name);
    if (c == null) {
      counters.putIfAbsent(name, new LocalCounterImpl());
      return counters.get(name);
    } else {
      return c;
View Full Code Here

Examples of org.apache.flex.compiler.internal.common.Counter

     * Counts various types of tokens that are created, as well as the total
     * number of tokens.
     */
    private void countTokens()
    {
        Counter counter = Counter.getInstance();
        counter.incrementCount(getClass().getSimpleName());
        counter.incrementCount("tokens");
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.Counter

  /**
   * Relies on an external lock on {@link #lock} for thread safety.
   */
  private Counter getOrCreateCounter(String type){
    Counter cnt = counts.get(type);
    if (cnt == null){
      cnt = new Counter();
      counts.put(type, cnt);
    }
    return cnt;
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.startupprogress.StartupProgress.Counter

    long lastTxId = in.getLastTxId();
    long numTxns = (lastTxId - expectedStartingTxId) + 1;
    StartupProgress prog = NameNode.getStartupProgress();
    Step step = createStartupProgressStep(in);
    prog.setTotal(Phase.LOADING_EDITS, step, numTxns);
    Counter counter = prog.getCounter(Phase.LOADING_EDITS, step);
    long lastLogTime = now();
    long lastInodeId = fsNamesys.getLastInodeId();
   
    try {
      while (true) {
View Full Code Here

Examples of org.apache.hadoop.mapred.Counters.Counter

            System.out.println("Counters not available for retired job " +
                jobid);
            exitCode = -1;
          } else {
            Group group = counters.getGroup(counterGroupName);
            Counter counter = group.getCounterForName(counterName);
            System.out.println(counter.getCounter());
            exitCode = 0;
          }
        }
      } else if (killJob) {
        RunningJob job = getJob(JobID.forName(jobid));
View Full Code Here

Examples of org.apache.hadoop.mapred.JobInProgress.Counter

   * @param status {@link TaskStatus} of the completed task, cannot be
   *               <code>null</code>
   */
  @SuppressWarnings("deprecation")
  private void meterTaskAttemptUnprotected(TaskInProgress tip, TaskStatus status) {
    Counter slotCounter =
      (tip.isMapTask()) ? Counter.SLOTS_MILLIS_MAPS :
                          Counter.SLOTS_MILLIS_REDUCES;
    jobCounters.incrCounter(slotCounter,
                            tip.getNumSlotsRequired() *
                            (status.getFinishTime() - status.getStartTime()));
View Full Code Here

Examples of org.apache.hadoop.mapreduce.Counter

      return;
    }

    try {
      for (Map.Entry<String, Long> entry:scanMetrics.getMetricsMap().entrySet()) {
        Counter ct = (Counter)getCounter.invoke(context,
            HBASE_COUNTER_GROUP_NAME, entry.getKey());

        ct.increment(entry.getValue());
      }
      ((Counter) getCounter.invoke(context, HBASE_COUNTER_GROUP_NAME,
          "NUM_SCANNER_RESTARTS")).increment(numScannerRestarts);
    } catch (Exception e) {
      LOG.debug("can't update counter." + StringUtils.stringifyException(e));
View Full Code Here

Examples of org.apache.hadoop.mapreduce.Counter

    ArrayList<String> values = new ArrayList<String>();
    values.add(value1);

    Reducer.Context context = mock(Reducer.Context.class);
    Counters counters = new Counters();
    Counter counter = counters.findCounter(DedupRecordCounter.OUTPUT);
    when(context.getCounter(DedupRecordCounter.OUTPUT)).thenReturn(counter);
    DedupKeyReducer dedupReducer = new DedupKeyReducer();
    dedupReducer.reduce(hihoTuple, values, context);
    verify(context).write(key, value1);
    assertEquals(1, context.getCounter(DedupRecordCounter.OUTPUT)
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.