sijie commented on a change in pull request #1085: [Merge Yahoo repo]: YBK-160: 
Doing distributed random verification of ledger fragments
URL: https://github.com/apache/bookkeeper/pull/1085#discussion_r164839733
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
 ##########
 @@ -1804,6 +1805,26 @@ public long getAuditorPeriodicBookieCheckInterval() {
         return getLong(AUDITOR_PERIODIC_BOOKIE_CHECK_INTERVAL, 86400);
     }
 
+    /**
+     * Set what percentage of a ledger (fragment)'s entries will be verified.
+     * 0 - only the first and entry of each ledger fragment would be verified
+     * 100 - the entire ledger fragment would be verified
+     * anything else - randomly picked entries from over the fragment would be 
verifiec
+     * @param auditorLedgerVerificationPercentage The verification proportion 
as a percentage
+     */
+    public void setAuditorLedgerVerificationPercentage(long 
auditorLedgerVerificationPercentage) {
+        setProperty(AUDITOR_LEDGER_VERIFICATION_PERCENTAGE, 
auditorLedgerVerificationPercentage);
+    }
+
+    /**
+     * Get what percentage of a ledger (fragment)'s entries will be verified.
+     * @see #setAuditorLedgerVerificationPercentage(long)
+     * @return percentage of a ledger (fragment)'s entries will be verifie. 
Default is 100%
+     */
+    public long getAuditorLedgerVerificationPercentage() {
+        return getLong(AUDITOR_LEDGER_VERIFICATION_PERCENTAGE, 100);
 
 Review comment:
   shall we make the default value as `0`, which by default this feature is not 
enabled.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to