Examples of findCounter()


Examples of org.apache.hadoop.mapred.Counters.findCounter()

  public void testCommandLine() throws Exception {
    super.testCommandLine();
    // validate combiner counters
    String counterGrp = "org.apache.hadoop.mapred.Task$Counter";
    Counters counters = job.running_.getCounters();
    assertTrue(counters.findCounter(
               counterGrp, "COMBINE_INPUT_RECORDS").getValue() != 0);
    assertTrue(counters.findCounter(
               counterGrp, "COMBINE_OUTPUT_RECORDS").getValue() != 0);
  }
View Full Code Here

Examples of org.apache.hadoop.mapred.Counters.findCounter()

    // validate combiner counters
    String counterGrp = "org.apache.hadoop.mapred.Task$Counter";
    Counters counters = job.running_.getCounters();
    assertTrue(counters.findCounter(
               counterGrp, "COMBINE_INPUT_RECORDS").getValue() != 0);
    assertTrue(counters.findCounter(
               counterGrp, "COMBINE_OUTPUT_RECORDS").getValue() != 0);
  }

  public static void main(String[]args) throws Exception
  {
View Full Code Here

Examples of org.apache.hadoop.mapred.Counters.findCounter()

                    PigStatsUtil.REDUCE_OUTPUT_RECORDS).getCounter();
            hdfsBytesRead = hdfsgroup.getCounterForName(
                    PigStatsUtil.HDFS_BYTES_READ).getCounter();     
            hdfsBytesWritten = hdfsgroup.getCounterForName(
                    PigStatsUtil.HDFS_BYTES_WRITTEN).getCounter();           
            spillCount = counters.findCounter(
                    PigCounters.SPILLABLE_MEMORY_MANAGER_SPILL_COUNT)
                    .getCounter();
            activeSpillCountObj = counters.findCounter(
                    PigCounters.PROACTIVE_SPILL_COUNT_BAGS).getCounter();
            activeSpillCountRecs = counters.findCounter(
View Full Code Here

Examples of org.apache.hadoop.mapred.Counters.findCounter()

            hdfsBytesWritten = hdfsgroup.getCounterForName(
                    PigStatsUtil.HDFS_BYTES_WRITTEN).getCounter();           
            spillCount = counters.findCounter(
                    PigCounters.SPILLABLE_MEMORY_MANAGER_SPILL_COUNT)
                    .getCounter();
            activeSpillCountObj = counters.findCounter(
                    PigCounters.PROACTIVE_SPILL_COUNT_BAGS).getCounter();
            activeSpillCountRecs = counters.findCounter(
                    PigCounters.PROACTIVE_SPILL_COUNT_RECS).getCounter();

            Iterator<Counter> iter = multistoregroup.iterator();
View Full Code Here

Examples of org.apache.hadoop.mapred.Counters.findCounter()

            spillCount = counters.findCounter(
                    PigCounters.SPILLABLE_MEMORY_MANAGER_SPILL_COUNT)
                    .getCounter();
            activeSpillCountObj = counters.findCounter(
                    PigCounters.PROACTIVE_SPILL_COUNT_BAGS).getCounter();
            activeSpillCountRecs = counters.findCounter(
                    PigCounters.PROACTIVE_SPILL_COUNT_RECS).getCounter();

            Iterator<Counter> iter = multistoregroup.iterator();
            while (iter.hasNext()) {
                Counter cter = iter.next();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.CounterGroup.findCounter()

    Counters c = new Counters();
    Map<String, Map<String, Long>> values = counters.value();
    for (Map.Entry<String, Map<String, Long>> e : values.entrySet()) {
      CounterGroup cg = c.getGroup(e.getKey());
      for (Map.Entry<String, Long> f : e.getValue().entrySet()) {
        cg.findCounter(f.getKey()).setValue(f.getValue());
      }
    }
    return c;
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.Counters.findCounter()

  @Test(expected = IOException.class)
  public final void testMapperForNullKeyValue() throws IOException,
      InterruptedException {
    Mapper.Context context = mock(Mapper.Context.class);
    Counters counters = new Counters();
    Counter counter = counters.findCounter(MergeRecordCounter.BAD_RECORD);
    when(context.getCounter(MergeRecordCounter.BAD_RECORD)).thenReturn(
        counter);
    MergeKeyMapper mapper = new MergeKeyMapper();
    Text val = new Text("valueOfKey");
    mapper.map(null, val, context);
View Full Code Here

Examples of org.apache.hadoop.mapreduce.Counters.findCounter()

  @Test
  public final void testMapperValidValues() throws IOException,
      InterruptedException {
    Mapper.Context context = mock(Mapper.Context.class);
    Counters counters = new Counters();
    Counter counter = counters
        .findCounter(MergeRecordCounter.TOTAL_RECORDS_NEW);
    when(context.getCounter(MergeRecordCounter.TOTAL_RECORDS_NEW))
        .thenReturn(counter);

    MergeKeyMapper mapper = new MergeKeyMapper();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.Counters.findCounter()

                  job.getConfiguration()).getClass()
              .getName());
      job.waitForCompletion(false);
      if (job.isComplete()) {
        Counters counters = job.getCounters();
        totalRecordsOld = counters.findCounter(
            MergeRecordCounter.TOTAL_RECORDS_OLD).getValue();
        totalRecordsNew = counters.findCounter(
            MergeRecordCounter.TOTAL_RECORDS_NEW).getValue();
        badRecords = counters.findCounter(
            MergeRecordCounter.BAD_RECORD).getValue();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.Counters.findCounter()

      job.waitForCompletion(false);
      if (job.isComplete()) {
        Counters counters = job.getCounters();
        totalRecordsOld = counters.findCounter(
            MergeRecordCounter.TOTAL_RECORDS_OLD).getValue();
        totalRecordsNew = counters.findCounter(
            MergeRecordCounter.TOTAL_RECORDS_NEW).getValue();
        badRecords = counters.findCounter(
            MergeRecordCounter.BAD_RECORD).getValue();
        output = counters.findCounter(MergeRecordCounter.OUTPUT)
            .getValue();
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.