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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBenchmarkCounter.NullCounter
-
Constructor Summary
Constructors Constructor Description BenchmarkCounter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longgetBytesRead()static longgetTime()static longgetTotalBytes()static voidincrementBytesRead(long val)static voidincrementTime(long val)static voidincrementTotalBytes(long val)static voidinitCounterFromContext(org.apache.hadoop.mapreduce.TaskAttemptContext context)Init counters in hadoop's mapreduce API, support both 1.x and 2.xstatic voidinitCounterFromReporter(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.
-
-
-
Method Detail
-
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 reporterconfiguration- 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()
-
-