- 
                Notifications
    You must be signed in to change notification settings 
- Fork 86
[PLUGIN-1717]: Added implementation for openFile and openFileWithOptions #1543
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
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.
Also add e2e tests for this change.
87fe62c    to
    1331f95      
    Compare
  
    | 
 Please create a JIRA , add in a follow up PR | 
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.
Please squash commits before merging
| protected CompletableFuture<FSDataInputStream> openFileWithOptions(Path path, OpenFileParameters parameters) { | ||
| return CompletableFuture.supplyAsync(() -> { | ||
| try { | ||
| int bufferSize = parameters.getBufferSize() > 0 ? parameters.getBufferSize() : 4096; | 
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.
use DEFAULT_BUFFER_SIZE instead of 4096
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.
updated !
| private static final String FS_SCHEME = CONF_PREFIX + "scheme"; | ||
| private static final String FS_IMPL = CONF_PREFIX + "impl"; | ||
| private static final String DECRYPTOR_IMPL = CONF_PREFIX + "decryptor.impl"; | ||
| private static final int DEFAULT_BUFFER_SIZE = 4096; | 
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.
how did we calculate this?
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.
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.
@psainics please fix this
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.
updated !
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.
added one comment and one question.

Fix encrypted file reader for DP 2.1 and above
Bug Tracker
PLUGIN-1717
Description
Currently the file read on 2.1, 2.2 produces garbage binary data when reading an encrypted file, this is caused as new Hadoop version uses different file open methods.
This PR overrides the new file open method used and extend the decryption logic being used.
Code change
Tests
Meta
Test Case [100 - Ephemeral]
Test Case [100K - Ephemeral]
Test Case [100 - DP2.0]
Test Case [100K - DP2.0]
Test Case [100 - DP2.1]
Test Case [100K - DP2.1]
Test Case [100 - DP2.2]
Test Case [100K - DP2.2]