jackye1995 commented on pull request #1573:
URL: https://github.com/apache/iceberg/pull/1573#issuecomment-708658252


   > @jackye1995 and @kbendick I think you both make a good case for going 
forward with v2. After looking into the docs a little, the main point for me 
was that it provides more control over the underlying http transport, which we 
may want to take advantage of.
   > 
   > The usage in the initial version is pretty basic and should be trivial to 
switch over to v2 (I have no objection to doing that).
   > 
   > The main issue is testing support for the s3mock library with junit4 
doesn't appear to support v2 so we would need to switch to junit5. (Is there 
better testing harnesses in/for v2?). @rdblue do you have any objection to 
using junit5 for this module?
   
   What do you mean by S3Mock library not supporting v2? S3Mock runs as a 
server, and a client can simply override the endpoint to localhost to 
communicate with the server. The version of the client should not matter.
   
   server:
   ```java
   S3MockApplication.start("--server.port=8001");
   ```
   
   client:
   ```java
   s3 = S3Client.builder()
               .endpointOverride(URI.create("http://localhost:8001";))
               .region(Region.US_EAST_1) // dummy region
               .credentialsProvider(StaticCredentialsProvider.create(
                       AwsBasicCredentials.create("key", "secret"))) // dummy 
credential
               .build();
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to