Elffuss BraidHub

kikocis/java-driver public

JAVA-1151: Fail fast if HdrHistogram is not in the classpath.
Changeset5eaa4fe5762b58b792a85b71dd8438758425c6b2e83fd25ee884b3e3707233d6
Authorolim7t <omichallat+github@gmail.com> · 2016-04-06 20:40 +02:00
Committerolim7t <omichallat+github@gmail.com> · 2016-04-19 11:50 +02:00
Parents90868556be12

Browse the files at this changeset

2 files changed

modified changelog/README.md +1 −0
@@ -4,6 +4,7 @@
44
55 - [bug] JAVA-1132: Executing bound statement with no variables results in exception with protocol v1.
66 - [improvement] JAVA-1040: SimpleStatement parameters support in QueryLogger.
7+- [improvement] JAVA-1151: Fail fast if HdrHistogram is not in the classpath.
78
89 Merged from 2.1 branch:
910
modified driver-core/src/main/java/com/datastax/driver/core/PerHostPercentileTracker.java +6 −0
@@ -76,6 +76,12 @@
7676 int numberOfHosts,
7777 int minRecordedValues,
7878 long intervalMs) {
79+ try {
80+ Histogram.class.getName();
81+ } catch (NoClassDefFoundError e) {
82+ throw new IllegalStateException("HdrHistogram seems to be missing from the classpath. " +
83+ "Make sure you depend on it explicitly (the driver declares it as optional).", e);
84+ }
7985 this.highestTrackableLatencyMillis = highestTrackableLatencyMillis;
8086 this.numberOfSignificantValueDigits = numberOfSignificantValueDigits;
8187 this.minRecordedValues = minRecordedValues;