Class BenchmarkCounter

java.lang.Object
org.apache.parquet.hadoop.util.counters.BenchmarkCounter

public class BenchmarkCounter extends Object
Encapsulate counter operations, compatible with Hadoop1/2, mapred/mapreduce API
  • Constructor Details

    • BenchmarkCounter

      public BenchmarkCounter()
  • Method Details

    • initCounterFromContext

      public static void initCounterFromContext(org.apache.hadoop.mapreduce.TaskAttemptContext context)
      Init counters in hadoop's mapreduce API, support both 1.x and 2.x
      Parameters:
      context - a task attempt context
    • initCounterFromReporter

      public static void initCounterFromReporter(org.apache.hadoop.mapred.Reporter reporter, org.apache.hadoop.conf.Configuration configuration)
      Init counters in hadoop's mapred API, which is used by cascading and Hive.
      Parameters:
      reporter - a reporter
      configuration - a configuration
    • incrementTotalBytes

      public static void incrementTotalBytes(long val)
    • getTotalBytes

      public static long getTotalBytes()
    • incrementBytesRead

      public static void incrementBytesRead(long val)
    • getBytesRead

      public static long getBytesRead()
    • incrementTime

      public static void incrementTime(long val)
    • getTime

      public static long getTime()