Skip to content

Commit 63e44b3

Browse files
committed
JAVA-1151: Fail fast if HdrHistogram is not in the classpath.
1 parent 4e5dafd commit 63e44b3

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

changelog/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

driver-core/src/main/java/com/datastax/driver/core/PerHostPercentileTracker.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ private PerHostPercentileTracker(long highestTrackableLatencyMillis, int numberO
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;

0 commit comments

Comments
 (0)