mirror of
https://github.com/apache/impala.git
synced 2026-01-01 18:00:30 -05:00
Logging file or table data is a bad idea, and doing it by default is particularly bad. This patch changes HdfsScanNode::LogRowParseError() to log a file and offset only. Testing: See rewritten tests. To support testing this change, we also fix IMPALA-3895, by introducing a canonical string __HDFS_FILENAME__ that all Hadoop filenames in the ERROR output are replaced with before comparing with the expected results. This fixes a number of issues with the old way of matching filenames which purported to be a regex, but really wasn't. In particular, we can now match the rest of an ERROR line after the filename, which was not possible before. In some cases, we don't want to substitute filenames because the ERROR output is looking for a very specific output. In that case we can write: $NAMENODE/<filename> and this patch will not perform _any_ filename substitutions on ERROR sections that contain the $NAMENODE string. Finally, this patch fixes a bug where a test that had an ERRORS section but no RESULTS section would silently pass without testing anything. Change-Id: I5a604f8784a9ff7b4bf878f82ee7f56697df3272 Reviewed-on: http://gerrit.cloudera.org:8080/4020 Reviewed-by: Henry Robinson <henry@cloudera.com> Tested-by: Internal Jenkins
17 lines
572 B
Plaintext
17 lines
572 B
Plaintext
====
|
|
---- QUERY
|
|
select count(*) from functional_seq_snap.bad_seq_snap
|
|
---- ERRORS
|
|
Bad synchronization marker
|
|
Expected: '6e 91 6 ec be 78 a0 ac 72 10 7e 41 b4 da 93 3c '
|
|
Actual: '6e 91 6 78 78 78 a0 ac 72 10 7e 41 b4 da 93 3c '
|
|
Problem parsing file __HDFS_FILENAME__ at 899514 (1 of 5 similar)
|
|
Decompressor: invalid compressed length. Data is likely corrupt. (1 of 3 similar)
|
|
Tried to read 896782 bytes but could only read 896777 bytes. This may indicate data file corruption. (file __HDFS_FILENAME__, byte offset: 2691508)
|
|
|
|
---- RESULTS
|
|
9434
|
|
---- TYPES
|
|
bigint
|
|
====
|