-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add encryption tests using AWS S3 java SDK #264
Conversation
0f35ec9
to
f7264f9
Compare
102c326
to
f18352b
Compare
Ready for review & merge |
9849a85
to
063c1a1
Compare
ping @nitisht & @balamurugana |
@vadmeste I tried building this locally, but the mint build failed. Am I missing something? Here is the build trace
|
@nitisht this is mostly a one time error or network problem.. can you try one time again ? |
You're right, looks like building now |
tested locally and works fine @vadmeste . Can you update the |
@nitisht oh yes, Readme needs to be updated but Dockerfile.dev is already updated, do we need to do something with Dockerfile ? |
Dockerfile automatically loops through all the directories, so nothing to be done there. |
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.
LGTM & Tested locally
ping @balamurugana, please take a look |
build/aws-sdk-java/build.xml
Outdated
@@ -0,0 +1,58 @@ | |||
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="hello-ivy" default="run"> |
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.
Is it possible to use gradle
here? gradle
is simple and clean.
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.
Is it possible to use gradle here? gradle is simple and clean.
I liked ivy over gradle because gradle has some internal working that we don't understand. ivy here downloads dependencies in the current folder (gradle is doing it somewhere else) and then it becomes simple to generate a jar file and clean all the stuff and have a minimal docker image.
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.
I think gradle
does a decent job here. gradle build scripts are simple to read. Similarly we already depends on gradle
for minio-java
and would reduce one more build dependency in mint.
gradle
generally downloads dependencies under ~/.gradle
and single jar file can be obtained after successful build from build
directory like minio-java-<VERSION>-all.jar
.
However the choice is yours.
import java.io.*; | ||
|
||
// RandAccessFile wraps RandomAccessFile and overrides | ||
// close() to make it non-operational. |
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.
Could you tell me why close()
needs to be non-operational?
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.
Could you tell me why close() needs to be non-operational?
I added this because AWS S3 java sdk was closing input stream after uploading a file.. but it looks like I can avoid all this and make the code simpler to understand. Will update.
|
||
|
||
// InputStreamNopCloser wraps the regular input stream but it | ||
// cancels close() call to make it no operational. |
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.
Could you tell me why we need a stream with close()
as no-op?
} | ||
|
||
// Test download object with Get Range, 64*1024 -> 64*1024 | ||
public static void test_downloadGetRange_5() throws Exception { |
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.
I think downloadGetRange_test5()
would be clean.
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.
I think downloadGetRange_test5() would be clean.
You are right
b1a7e0e
to
805f916
Compare
@balamurugana I removed RandAccessFile & InputStreamNopCloser classes so it is easier to understand. Please review again. |
Fixes #262