|
23 | 23 | import java.net.URI;
|
24 | 24 | import java.net.URISyntaxException;
|
25 | 25 | import java.util.concurrent.TimeUnit;
|
26 |
| - |
| 26 | +import org.slf4j.Logger; |
| 27 | +import org.slf4j.LoggerFactory; |
27 | 28 | import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
|
28 | 29 | import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
|
29 | 30 | import software.amazon.awssdk.core.retry.RetryPolicy;
|
|
35 | 36 | import software.amazon.awssdk.services.sts.model.AssumeRoleRequest;
|
36 | 37 | import software.amazon.awssdk.services.sts.model.Credentials;
|
37 | 38 | import software.amazon.awssdk.services.sts.model.GetSessionTokenRequest;
|
38 |
| -import software.amazon.awssdk.thirdparty.org.apache.http.client.utils.URIBuilder; |
39 |
| -import org.apache.hadoop.fs.s3a.impl.AWSClientConfig; |
40 |
| -import org.apache.hadoop.util.Preconditions; |
41 |
| - |
42 |
| -import org.slf4j.Logger; |
43 |
| -import org.slf4j.LoggerFactory; |
44 |
| - |
45 | 39 |
|
46 | 40 | import org.apache.hadoop.classification.InterfaceAudience;
|
47 | 41 | import org.apache.hadoop.classification.InterfaceStability;
|
48 | 42 | import org.apache.hadoop.conf.Configuration;
|
49 | 43 | import org.apache.hadoop.fs.s3a.Invoker;
|
50 | 44 | import org.apache.hadoop.fs.s3a.Retries;
|
| 45 | +import org.apache.hadoop.fs.s3a.impl.AWSClientConfig; |
| 46 | +import org.apache.hadoop.util.Preconditions; |
51 | 47 |
|
52 | 48 | import static org.apache.commons.lang3.StringUtils.isEmpty;
|
53 | 49 | import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
@@ -167,7 +163,7 @@ public static StsClientBuilder builder(final AwsCredentialsProvider credentials,
|
167 | 163 | */
|
168 | 164 | private static URI getSTSEndpoint(String endpoint) {
|
169 | 165 | try {
|
170 |
| - return new URIBuilder().setScheme("https").setHost(endpoint).build(); |
| 166 | + return new URI("https", endpoint, null, null); |
171 | 167 | } catch (URISyntaxException e) {
|
172 | 168 | throw new IllegalArgumentException(e);
|
173 | 169 | }
|
|
0 commit comments