-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29123: Extend ProtobufInputFormat to handle EOFException for par… #6010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tially written proto files
|
is that trying to solve same issue as #5983? |
Based on the description provided in the PR, the issue appears to be different compared to #5983. @rtrivedi12, can you please provide steps for how you created "partially written dag data file." which you used for testing? |
This This partially written dag_data file was created by executing a long- running query and killing the yarn application in between which leaves a partially written dag_data file by Tez |
ql/src/java/org/apache/hadoop/hive/ql/io/protobuf/LenientProtobufMessageInputFormat.java
Show resolved
Hide resolved
ql/src/java/org/apache/hadoop/hive/ql/io/protobuf/LenientProtobufMessageInputFormat.java
Outdated
Show resolved
Hide resolved
|
I believe the relationship between this PR and this codepath below should be clarified: hive/ql/src/java/org/apache/hadoop/hive/ql/io/protobuf/ProtobufMessageInputFormat.java Lines 67 to 75 in df98c2e
If this PR calls the new RecordReader a SafeRecordReader, then maybe we need to change it to distinguish between the two "safe" things:
|
Good point, missed it! It may be confusing with Parent SafeRecordReader; I will rename and clarify in the Java doc. |
|
abstractdog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 LGTM



…tially written proto files
What changes were proposed in this pull request?
This PR introduces a more lenient version of ProtobufInputFormat that ignores EOFException when reading partially written proto files.
ProtobufMessageInputFormat skips zero-byte files by creating , which ignores EOFException.
Why are the changes needed?
Abrupt AM termination or OOM failures can result in partially written protobuf files. When reading data from the corresponding external table, these incomplete files may trigger an EOFException, causing the entire query to fail.
To improve resilience, it would be better to gracefully skip unreadable or corrupted proto files and continue reading the remaining valid data, instead of failing the entire query.
Does this PR introduce any user-facing change?
Yes, this would silently skip reading partially written proto files instead of failing with EOFException.
How was this patch tested?
Manually tested with a sample partially written dag data file.