[core] don't print dbwrapper err log msg many times
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,11 +101,13 @@ public class DBWrapper extends DB {
}
}
+ 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());
}
}
+ }
/**
* Cleanup any state for this DB.
