This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
Fixing bug where large index files weren't being read fully #489
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the context for this pull request?
I ran into an issue where I was unable to use any of the created indexes, due to a Json Parser claiming it encountered invalid chars.
This was misleading, because the actual issue was that only a portion of the index file was being read.
What changes were proposed in this pull request?
Changing the FileSystem.read() to a FileSystem.readFully().
This is because using .read() does not always read in the full file.
This bug fix very likely fixes these:
#431
#373
#297 (comment) (point #2)
Does this PR introduce any user-facing change?
No
How was this patch tested?
I compiled/packaged the code and ran it on an EMR (spark 3.1) cluster to generate a relatively large (8MB in my case) index file in an s3 location
With this change I was able to use the index to run a query.