-
Notifications
You must be signed in to change notification settings - Fork 89
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
[vpj] Improve error handling in VeniceVsonFileIterator and add tests #1406
base: main
Are you sure you want to change the base?
[vpj] Improve error handling in VeniceVsonFileIterator and add tests #1406
Conversation
…ition failures and ensure fileReader is properly initialized. - Improved error messages and logging to include detailed information and stack traces for easier debugging. - Added null check for VeniceVsonRecordReader in the constructor. - Added VeniceVsonFileIteratorTest to test initialization and handle exceptions.
903e1d6
to
6d0c4bc
Compare
String errorMessage = | ||
String.format("Failed to open file: %s. Ensure that the file is a valid sequence file.", hdfsPath.getName()); | ||
LOGGER.error(errorMessage, e); | ||
throw new VeniceException(errorMessage, e); |
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.
Not sure if this is the right thing to do
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.
Let me check how Avro input works. I'm very surprised this didn't fail for the avro inputs
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.
It does fail for avro input (non sequence file)
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.
Not sure if this is the right thing to do
Why? If we can't create fileReader
what's the point in continuing with the execution? We can add retries (for non-seq file exception) if we want to have additional layer of protection
Fix NPE in VeniceVsonFileIterator when input file is not SequenceFile
ensure fileReader is properly initialized.
easier debugging.
How was this PR tested?
UT
Does this PR introduce any user-facing changes?