Elffuss BraidHub

kikocis/java-driver public

Merge pull request #644 from datastax/java1151

JAVA-1151: Fail fast if HdrHistogram is not in the classpath.
Changesetd4e62c9f03b82d536e02a4fa3c13e3a3d46770c47a6a11b3a6dac7dee7b0c024
AuthorOlivier Michallat <olim7t@users.noreply.github.com> · 2016-04-19 11:52 +02:00
CommitterOlivier Michallat <olim7t@users.noreply.github.com> · 2016-04-19 11:52 +02:00
Parents90868556be12, 5eaa4fe5762b

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;