You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/05/10 14:08:42 UTC
[GitHub] [hadoop] iwasakims commented on a change in pull request #2003: HADOOP-16768. SnappyCompressor wrongly truncates the compressed data
iwasakims commented on a change in pull request #2003:
URL: https://github.com/apache/hadoop/pull/2003#discussion_r422650414
##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/snappy/SnappyCompressor.java
##########
@@ -234,8 +234,6 @@ public int compress(byte[] b, int off, int len)
finished = true;
}
- // Get atmost 'len' bytes
- n = Math.min(n, len);
Review comment:
Do we need this change? This could cause IndexOutOfBoundsException on [consuming compressed data](https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/CompressorStream.java#L91-L93).
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org