frankgh commented on code in PR #46:
URL: 
https://github.com/apache/cassandra-analytics/pull/46#discussion_r1541831858


##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/utils/XXHash32DigestAlgorithm.java:
##########
@@ -61,7 +61,10 @@ public Digest calculateFileDigest(Path path) throws 
IOException
             {
                 hasher.update(buffer, 0, len);
             }
-            return new XXHash32Digest(Long.toHexString(hasher.getValue()), 
SEED);
+            // lz4 library doesn't mask the hash value, so we need to mask it 
to
+            // prevent forwarding the negative sign bit when converting to a 
long value
+            long hash = hasher.getValue() & 0xffffffffL;

Review Comment:
   that makes sense. Thanks for the clarification. I've pushed a commit to 
address this.



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to