зеркало из https://github.com/Azure/YCSB.git
[core] don't print dbwrapper err log msg many times (#1481)
Co-authored-by: Sean Busbey <sean.busbey@gmail.com>
This commit is contained in:
Родитель
bee93f2a8c
Коммит
e31b5039d2
|
@ -18,11 +18,13 @@
|
|||
package site.ycsb;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import site.ycsb.measurements.Measurements;
|
||||
import org.apache.htrace.core.TraceScope;
|
||||
import org.apache.htrace.core.Tracer;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/**
|
||||
* Wrapper around a "real" DB that measures latencies and counts return codes.
|
||||
|
@ -41,6 +43,8 @@ public class DBWrapper extends DB {
|
|||
|
||||
private static final String LATENCY_TRACKED_ERRORS_PROPERTY = "latencytrackederrors";
|
||||
|
||||
private static final AtomicBoolean LOG_REPORT_CONFIG = new AtomicBoolean(false);
|
||||
|
||||
private final String scopeStringCleanup;
|
||||
private final String scopeStringDelete;
|
||||
private final String scopeStringInit;
|
||||
|
@ -97,9 +101,11 @@ public class DBWrapper extends DB {
|
|||
}
|
||||
}
|
||||
|
||||
System.err.println("DBWrapper: report latency for each error is " +
|
||||
this.reportLatencyForEachError + " and specific error codes to track" +
|
||||
" for latency are: " + this.latencyTrackedErrors.toString());
|
||||
if (LOG_REPORT_CONFIG.compareAndSet(false, true)) {
|
||||
System.err.println("DBWrapper: report latency for each error is " +
|
||||
this.reportLatencyForEachError + " and specific error codes to track" +
|
||||
" for latency are: " + this.latencyTrackedErrors.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче