use of org.apache.hive.spark.counter.SparkCounterGroup in project hive by apache.
the class SparkStatisticsBuilder method add.
public SparkStatisticsBuilder add(SparkCounters sparkCounters) {
for (SparkCounterGroup counterGroup : sparkCounters.getSparkCounterGroups().values()) {
String groupDisplayName = counterGroup.getGroupDisplayName();
List<SparkStatistic> statisticList = statisticMap.get(groupDisplayName);
if (statisticList == null) {
statisticList = new LinkedList<SparkStatistic>();
statisticMap.put(groupDisplayName, statisticList);
}
for (SparkCounter counter : counterGroup.getSparkCounters().values()) {
String displayName = counter.getDisplayName();
statisticList.add(new SparkStatistic(displayName, Long.toString(counter.getValue())));
}
}
return this;
}
Aggregations