Skip to content

Commit 28a0241

Browse files
committed
Remove getAmazonS3ClientForTesting
1 parent 8748ac3 commit 28a0241

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,21 +1306,6 @@ private AmazonS3 getAmazonS3Client() {
13061306
return s3;
13071307
}
13081308

1309-
/**
1310-
* Returns the S3 client used by this filesystem.
1311-
* <i>Warning: this must only be used for testing, as it bypasses core
1312-
* S3A operations. </i>
1313-
* @param reason a justification for requesting access.
1314-
* @return AmazonS3Client
1315-
*/
1316-
// TODO: Remove when we remove S3V1 client
1317-
@VisibleForTesting
1318-
public AmazonS3 getAmazonS3ClientForTesting(String reason) {
1319-
LOG.warn("Access to S3A client requested, reason {}", reason);
1320-
V2Migration.v1S3ClientRequested();
1321-
return s3;
1322-
}
1323-
13241309
/**
13251310
* Returns the S3 client used by this filesystem.
13261311
* <i>Warning: this must only be used for testing, as it bypasses core

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/AbstractS3AMockTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
import static org.apache.hadoop.fs.s3a.Constants.*;
2222

23-
import com.amazonaws.services.s3.AmazonS3;
24-
2523
import java.net.URI;
2624

2725
import org.apache.hadoop.conf.Configuration;
@@ -55,7 +53,6 @@ public abstract class AbstractS3AMockTest {
5553
public ExpectedException exception = ExpectedException.none();
5654

5755
protected S3AFileSystem fs;
58-
protected AmazonS3 s3;
5956
protected S3Client s3V2;
6057

6158
@Before
@@ -66,7 +63,6 @@ public void setup() throws Exception {
6663
// unset S3CSE property from config to avoid pathIOE.
6764
conf.unset(Constants.S3_ENCRYPTION_ALGORITHM);
6865
fs.initialize(uri, conf);
69-
s3 = fs.getAmazonS3ClientForTesting("mocking");
7066
s3V2 = fs.getAmazonS3V2ClientForTesting("mocking");
7167
}
7268

0 commit comments

Comments
 (0)