use of org.apache.hadoop.hive.common.metrics.common.MetricsScope in project hive by apache.
the class PerfLogger method cleanupPerfLogMetrics.
/**
* Cleans up any dangling perfLog metric call scopes.
*/
public void cleanupPerfLogMetrics() {
Metrics metrics = MetricsFactory.getInstance();
if (metrics != null) {
for (MetricsScope openScope : openScopes.values()) {
metrics.endScope(openScope);
}
}
openScopes.clear();
}
use of org.apache.hadoop.hive.common.metrics.common.MetricsScope in project hive by apache.
the class PerfLogger method beginMetrics.
private void beginMetrics(String method) {
Metrics metrics = MetricsFactory.getInstance();
if (metrics != null) {
MetricsScope scope = metrics.createScope(MetricsConstant.API_PREFIX + method);
openScopes.put(method, scope);
}
}
Aggregations