You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/01/03 00:02:20 UTC

[GitHub] reddycharan commented on a change in pull request #851: Issue 578 : make MajorCompaction controlled by time of the day/day of the week

reddycharan commented on a change in pull request #851: Issue 578 : make MajorCompaction controlled by time of the day/day of the week
URL: https://github.com/apache/bookkeeper/pull/851#discussion_r159342428
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
 ##########
 @@ -1101,6 +1105,101 @@ public ServerConfiguration setMajorCompactionThreshold(double threshold) {
         return this;
     }
 
+    /**
+     * Get threshold of median major compaction.
+     *
+     * <p>same with the @see #getMajorCompactionThreshold()
+     * the high threshold is used when the system is on a low load status
+     *
+     * @return threshold of median major compaction
+     */
+    public double getMedianMajorCompactionThreshold() {
+        return getDouble(MAJOR_MEDIAN_COMPACTION_THRESHOLD, 0.7f);
+    }
+
+    /**
+     * Set threshold of median major compaction.
+     *
+     * @see #getMedianMajorCompactionThreshold()
+     *
+     * @param threshold
+     *          Threshold of median major compaction
+     * @return server configuration
+     */
+    public ServerConfiguration setMedianMajorCompactionThreshold(double threshold) {
+        setProperty(MAJOR_MEDIAN_COMPACTION_THRESHOLD, threshold);
+        return this;
+    }
+
+    /**
+     * Get threshold of high major compaction.
+     *
+     * <p>same with the @see #getMajorCompactionThreshold()
+     * the high threshold is used when the system is on a very low load status
+     *
+     * @return threshold of high major compaction
+     */
+    public double getHighMajorCompactionThreshold() {
+        return getDouble(MAJOR_HIGH_COMPACTION_THRESHOLD, 0.9f);
 
 Review comment:
   can you add sample values to bk_server.conf

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services