dasahcc commented on a change in pull request #809: Add system property options
to config auto compression
URL: https://github.com/apache/helix/pull/809#discussion_r385425353
##########
File path:
zookeeper-api/src/main/java/org/apache/helix/zookeeper/datamodel/ZNRecord.java
##########
@@ -621,6 +632,22 @@ public void subtract(ZNRecord value) {
}
}
+ /**
+ * Returns compression threshold in bytes. The threshold is a smaller number
determined by the
+ * configured threshold and {@link ZNRecord#SIZE_LIMIT}.
+ *
+ * @return compress threshold in bytes
+ */
+ @JsonIgnore
+ public int getCompressThreshold() {
+ Integer threshold =
+
Integer.getInteger(ZkSystemPropertyKeys.ZNRECORD_SERIALIZER_COMPRESS_THRESHOLD_BYTES);
+ if (threshold == null || threshold < 0 || threshold > ZNRecord.SIZE_LIMIT)
{
Review comment:
We should not allow 0
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]