public class SparkCounters extends Object implements Serializable
Constructor and Description |
---|
SparkCounters(org.apache.spark.api.java.JavaSparkContext javaSparkContext) |
Modifier and Type | Method and Description |
---|---|
void |
createCounter(Enum<?> key) |
void |
createCounter(String groupName,
Enum<?> key) |
void |
createCounter(String groupName,
String counterName) |
void |
createCounter(String groupName,
String counterName,
long initValue) |
SparkCounter |
getCounter(Enum<?> key) |
SparkCounter |
getCounter(String groupName,
String counterName) |
Map<String,SparkCounterGroup> |
getSparkCounterGroups() |
long |
getValue(String groupName,
String counterName) |
void |
increment(Enum<?> key,
long incrValue) |
void |
increment(String groupName,
String counterName,
long value) |
SparkCounters |
snapshot()
Create a snapshot of the current counters to send back to the client.
|
String |
toString() |
public SparkCounters(org.apache.spark.api.java.JavaSparkContext javaSparkContext)
public void createCounter(Enum<?> key)
public void increment(Enum<?> key, long incrValue)
public SparkCounter getCounter(String groupName, String counterName)
public SparkCounter getCounter(Enum<?> key)
public Map<String,SparkCounterGroup> getSparkCounterGroups()
public SparkCounters snapshot()
Copyright © 2017 The Apache Software Foundation. All rights reserved.