5151import java .util .concurrent .atomic .AtomicBoolean ;
5252import javax .annotation .Nullable ;
5353
54- import com .amazonaws .SdkBaseException ;
55- import com .amazonaws .services .s3 .AmazonS3 ;
5654import com .amazonaws .services .s3 .Headers ;
57- import com .amazonaws .services .s3 .transfer .TransferManager ;
58- import com .amazonaws .services .s3 .transfer .TransferManagerConfiguration ;
5955
6056import org .apache .hadoop .fs .impl .prefetch .ExecutorServiceFuturePool ;
6157import org .slf4j .Logger ;
@@ -295,7 +291,6 @@ public class S3AFileSystem extends FileSystem implements StreamCapabilities,
295291 private URI uri ;
296292 private Path workingDir ;
297293 private String username ;
298- private AmazonS3 s3 ;
299294 private S3Client s3V2 ;
300295 private S3AsyncClient s3AsyncClient ;
301296 // initial callback policy is fail-once; it's there just to assist
@@ -316,7 +311,6 @@ public class S3AFileSystem extends FileSystem implements StreamCapabilities,
316311 private Listing listing ;
317312 private long partSize ;
318313 private boolean enableMultiObjectsDelete ;
319- private TransferManager transfers ;
320314 private S3TransferManager transferManagerV2 ;
321315 private ExecutorService boundedThreadPool ;
322316 private ThreadPoolExecutor unboundedThreadPool ;
@@ -986,10 +980,6 @@ private void bindAWSClient(URI name, boolean dtEnabled) throws IOException {
986980 .withRequesterPays (conf .getBoolean (ALLOW_REQUESTER_PAYS , DEFAULT_ALLOW_REQUESTER_PAYS ))
987981 .withExecutionInterceptors (auditManager .createExecutionInterceptors ());
988982
989- s3 = ReflectionUtils .newInstance (s3ClientFactoryClass , conf )
990- .createS3Client (getUri (),
991- parameters );
992-
993983 s3V2 = ReflectionUtils .newInstance (s3ClientFactoryClass , conf )
994984 .createS3ClientV2 (getUri (),
995985 parameters );
@@ -1185,16 +1175,6 @@ private void initTransferManager() {
11851175 .transferConfiguration (transferConfiguration ->
11861176 transferConfiguration .executor (unboundedThreadPool )) // TODO: double-check
11871177 .build ();
1188-
1189- TransferManagerConfiguration transferConfiguration =
1190- new TransferManagerConfiguration ();
1191- transferConfiguration .setMinimumUploadPartSize (partSize );
1192- transferConfiguration .setMultipartUploadThreshold (multiPartThreshold );
1193- transferConfiguration .setMultipartCopyPartSize (partSize );
1194- transferConfiguration .setMultipartCopyThreshold (multiPartThreshold );
1195-
1196- transfers = new TransferManager (s3 , unboundedThreadPool );
1197- transfers .setConfiguration (transferConfiguration );
11981178 }
11991179
12001180 private void initCannedAcls (Configuration conf ) {
@@ -1297,15 +1277,6 @@ public int getDefaultPort() {
12971277 return 0 ;
12981278 }
12991279
1300- /**
1301- * Returns the S3 client used by this filesystem.
1302- * This is for internal use within the S3A code itself.
1303- * @return AmazonS3Client
1304- */
1305- private AmazonS3 getAmazonS3Client () {
1306- return s3 ;
1307- }
1308-
13091280 /**
13101281 * Returns the S3 client used by this filesystem.
13111282 * <i>Warning: this must only be used for testing, as it bypasses core
@@ -4100,18 +4071,6 @@ public void close() throws IOException {
41004071 * both the expected state of this FS and of failures while being stopped.
41014072 */
41024073 protected synchronized void stopAllServices () {
4103- // shutting down the transfer manager also shuts
4104- // down the S3 client it is bonded to.
4105- if (transfers != null ) {
4106- try {
4107- transfers .shutdownNow (true );
4108- } catch (RuntimeException e ) {
4109- // catch and swallow for resilience.
4110- LOG .debug ("When shutting down" , e );
4111- }
4112- transfers = null ;
4113- }
4114-
41154074 // TODO: Do we need this for v2?
41164075 try {
41174076 if (transferManagerV2 != null ) {
0 commit comments