diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java index bdffd689a54..c06df7c2281 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java @@ -218,7 +218,7 @@ public void removeEntryLog(long logToRemove) { this.throttler = new AbstractLogCompactor.Throttler(conf); if (minorCompactionInterval > 0 && minorCompactionThreshold > 0) { - if (minorCompactionThreshold > 1.0f) { + if (minorCompactionThreshold > 1.0d) { throw new IOException("Invalid minor compaction threshold " + minorCompactionThreshold); } @@ -230,16 +230,16 @@ public void removeEntryLog(long logToRemove) { } if (isForceAllowCompaction) { - if (minorCompactionThreshold > 0 && minorCompactionThreshold < 1.0f) { + if (minorCompactionThreshold > 0 && minorCompactionThreshold < 1.0d) { isForceMinorCompactionAllow = true; } - if (majorCompactionThreshold > 0 && majorCompactionThreshold < 1.0f) { + if (majorCompactionThreshold > 0 && majorCompactionThreshold < 1.0d) { isForceMajorCompactionAllow = true; } } if (majorCompactionInterval > 0 && majorCompactionThreshold > 0) { - if (majorCompactionThreshold > 1.0f) { + if (majorCompactionThreshold > 1.0d) { throw new IOException("Invalid major compaction threshold " + majorCompactionThreshold); } diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java index 4db536ab495..cf74f6af01c 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java @@ -1676,7 +1676,7 @@ public boolean isForceAllowCompaction() { * @return threshold of minor compaction */ public double getMinorCompactionThreshold() { - return getDouble(MINOR_COMPACTION_THRESHOLD, 0.2f); + return getDouble(MINOR_COMPACTION_THRESHOLD, 0.2d); } /** @@ -1704,7 +1704,7 @@ public ServerConfiguration setMinorCompactionThreshold(double threshold) { * @return threshold of major compaction */ public double getMajorCompactionThreshold() { - return getDouble(MAJOR_COMPACTION_THRESHOLD, 0.8f); + return getDouble(MAJOR_COMPACTION_THRESHOLD, 0.8d); } /**