[HELIX-573] Add support to automatically compress/uncompress data in Zookeeper
Review Request #31836 - Created March 8, 2015 and updated
| Information | |
|---|---|
| Kishore Gopalakrishna | |
| helix-git | |
| Reviewers | |
| helix | |
commit 1ef44c2e9a132df3513a51e3a8dac658236a2263
Author: Kishore Gopalakrishna g.kishore@gmail.com
Date: Sun Mar 8 16:40:29 2015 -0700[HELIX-573] Add support to automatically compress/uncompress data in Zookeeper:100644 100644 4419fdd... 1f34529... M helix-core/src/main/java/org/apache/helix/manager/zk/ZNRecordSerializer.java
:100644 100644 2d7cb3c... 26d7e2b... M helix-core/src/main/java/org/apache/helix/manager/zk/ZNRecordStreamingSerializer.java
:000000 100644 0000000... 90c1e8e... A helix-core/src/test/java/org/apache/helix/manager/zk/TestZNRecordSerializer.java
:100644 100644 e4b0b25... 95064f8... M helix-core/src/test/java/org/apache/helix/manager/zk/TestZNRecordStreamingSerializer.java
:100755 100755 e869f25... 99ef81c... M hpost-review.sh
Added basic test for compress/uncompress
-
As currently written, compression will be default because valueOf returns true if the string is null. I'm not sure if you want that, or at the very least, it should be made explicit, i.e.:
if (record.getBooleanField("enableCompression", defaultValue) { -
Lines 91 and 92 can be combined into 1 line.
-
This log message won't be very useful if the bytes are compressed.
-
Same comment as above. Use getBooleanField. Also, consider putting this code in a common area since it's copy-pasted from the other serializer class.
-
Same comment about code duplication.
-
This method too.
Change Summary:
incorporated the feedback, also added the code in external view compute stage to copy the enableCompression from Idealstate to ExternalView
-
whitespace
-
indentation
-
helix-core/src/main/java/org/apache/helix/util/GZipCompressionUtil.java (Diff revision 2) -
License should come before imports.
-
helix-core/src/main/java/org/apache/helix/util/GZipCompressionUtil.java (Diff revision 2) -
whitespace
-
whitespace
-
whitespace