Skye Wanderman-Milne has posted comments on this change.

Change subject: IMPALA-3038: Add multistream gzip/bzip2 test coverage
......................................................................


Patch Set 4:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/2543/4/be/src/util/decompress-test.cc
File be/src/util/decompress-test.cc:

Line 161:       EXPECT_LE(total_output_produced, uncompressed_len);
How about move this below L168, and then you can remove the else condition on 
L178


Line 245:         compressed, uncompressed_len, uncompressed, false));
Call StreamingDecompress() again with the rest of the data and 
expected_stream_end = true.


Line 254:     *compressed_data = mem_pool_.Allocate(16 * 1024 * 1024 + 1);
Let's make these constants, e.g.:
int COMPRESSED_BUFFER_SIZE = 16 * 1024 * 1024;
int MAX_COMPRESSED_DATA_LEN = 15 * 1024 * 1024;
int UNCOMPRESSED_BUFFER_SIZE = 32 * 1024 * 1024;
int MAX_UNCOMPRESSED_BUFFER_SIZE = 31 * 1024 * 1024;

Also not sure you need the +1 here and below?


Line 259:     uint8_t raw_input[1024 * 1024 + 1];
Likewise define RAW_INPUT_SIZE = 1024 * 1024 or similar.


Line 260:     memset(&raw_input, 0, sizeof(raw_input));
Since you're setting all but the last byte below, I would change this to 
raw_input[RAW_INPUT_SIZE] = 0 and put it below the for loop.


Line 263:       *ip++ = 'a' + rand() % 26;
Instead of defining ip, you can use raw_input[i] (this is more idiomatic too 
since it's an array).


-- 
To view, visit http://gerrit.cloudera.org:8080/2543
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9b0e1971145dd457e71fc9c00ce7c06fff8dea88
Gerrit-PatchSet: 4
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Juan Yu <j...@cloudera.com>
Gerrit-Reviewer: Juan Yu <j...@cloudera.com>
Gerrit-Reviewer: Skye Wanderman-Milne <s...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to