zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] anmolnar commented on a change in pull request #770: ZOOKEEPER-3244: Add option to snapshot based on log size
Date Fri, 12 Apr 2019 19:55:18 GMT
anmolnar commented on a change in pull request #770: ZOOKEEPER-3244: Add option to snapshot
based on log size
URL: https://github.com/apache/zookeeper/pull/770#discussion_r275043509
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
 ##########
 @@ -919,8 +919,9 @@ public int getGlobalOutstandingLimit() {
         return limit;
     }
 
-    public static long getSnapSize() {
-        return Long.getLong("zookeeper.snapSize", 4294967296L); // 4GB by default
+    public static long getSnapSizeInBytes() {
+        long size = Long.getLong("zookeeper.snapSizeLimitInKb", 4194304L); // 4GB by default
+        return size > 0 ? size * 1024 : size; // Convert to bytes
 
 Review comment:
   I don't think you need this check. Just return `size * 1024` ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Mime
View raw message