Skip to content

Commit

Permalink
🐛 Destination S3: fix minio output for parquet format
Browse files Browse the repository at this point in the history
  • Loading branch information
varunbpatil authored Jul 13, 2021
1 parent 4962cf3 commit 52e098e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ public static Configuration getHadoopConfig(S3DestinationConfig config) {
Configuration hadoopConfig = new Configuration();
hadoopConfig.set(Constants.ACCESS_KEY, config.getAccessKeyId());
hadoopConfig.set(Constants.SECRET_KEY, config.getSecretAccessKey());
hadoopConfig
.set(Constants.ENDPOINT, String.format("s3.%s.amazonaws.com", config.getBucketRegion()));
if (config.getEndpoint().isEmpty()) {
hadoopConfig.set(Constants.ENDPOINT, String.format("s3.%s.amazonaws.com", config.getBucketRegion()));
} else {
hadoopConfig.set(Constants.ENDPOINT, config.getEndpoint());
hadoopConfig.set(Constants.PATH_STYLE_ACCESS, "true");
}
hadoopConfig.set(Constants.AWS_CREDENTIALS_PROVIDER,
"org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider");
return hadoopConfig;
Expand Down

0 comments on commit 52e098e

Please sign in to comment.