Skip to content

Commit

Permalink
TBR
Browse files Browse the repository at this point in the history
  • Loading branch information
istreeter committed Jul 20, 2024
1 parent 61899c8 commit ee35eb1
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ lazy val hudi: Project = project
.settings(libraryDependencies ++= Dependencies.hudiDependencies)
.dependsOn(core % "test->test")

lazy val tempHudi: Project = project
.in(file("packaging/hudi-aws"))
.settings(BuildSettings.commonSettings)
.settings(libraryDependencies ++= Dependencies.tempHudiDependencies)

lazy val biglake: Project = project
.in(file("packaging/biglake"))
.settings(BuildSettings.commonSettings ++ BuildSettings.biglakeSettings)
Expand All @@ -79,7 +84,7 @@ lazy val awsHudi: Project = project
.settings(libraryDependencies ++= Dependencies.awsDependencies ++ Dependencies.hudiAwsDependencies)
.dependsOn(core)
.enablePlugins(BuildInfoPlugin, JavaAppPackaging, SnowplowDockerPlugin)
.dependsOn(hudi % "runtime->runtime")
.dependsOn(hudi % "runtime->runtime", tempHudi)

lazy val gcpHudi: Project = project
.in(file("modules/gcp"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.hudi.aws.credentials;

import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain;

import java.util.ArrayList;
import java.util.List;
import java.util.Properties;

/**
* Factory class for Hoodie AWSCredentialsProvider.
*/
public class HoodieAWSCredentialsProviderFactory {
public static AwsCredentialsProvider getAwsCredentialsProvider(Properties props) {
return getAwsCredentialsProviderChain(props);
}

private static AwsCredentialsProvider getAwsCredentialsProviderChain(Properties props) {
List<AwsCredentialsProvider> providers = new ArrayList<>();
providers.add(new HoodieConfigAWSAssumedRoleCredentialsProvider(props));
AwsCredentialsProviderChain providerChain = AwsCredentialsProviderChain.builder()
.credentialsProviders(providers)
.reuseLastProviderEnabled(true)
.build();
return providerChain;
}
}
4 changes: 4 additions & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ object Dependencies {
awsRegistry % Runtime
)

val tempHudiDependencies = Seq(
hudiAws
)

val commonExclusions = Seq(
ExclusionRule(organization = "org.apache.zookeeper", name = "zookeeper"),
ExclusionRule(organization = "org.eclipse.jetty", name = "jetty-client"),
Expand Down

0 comments on commit ee35eb1

Please sign in to comment.