1818
1919package org .apache .hadoop .ozone .container .replication ;
2020
21- import java .io .IOException ;
2221import java .nio .file .Path ;
2322import java .nio .file .Paths ;
2423import java .util .List ;
2524import java .util .concurrent .CompletableFuture ;
26- import java .util .concurrent .ExecutorService ;
27- import java .util .concurrent .Executors ;
28- import java .util .concurrent .ThreadFactory ;
29- import java .util .concurrent .TimeUnit ;
3025import java .util .function .Function ;
3126
3227import org .apache .hadoop .conf .Configuration ;
3328import org .apache .hadoop .hdds .protocol .DatanodeDetails ;
3429import org .apache .hadoop .hdds .protocol .DatanodeDetails .Port .Name ;
3530import org .apache .hadoop .ozone .OzoneConfigKeys ;
3631
37- import com .google .common .util .concurrent .ThreadFactoryBuilder ;
3832import org .slf4j .Logger ;
3933import org .slf4j .LoggerFactory ;
4034
@@ -52,8 +46,6 @@ public class SimpleContainerDownloader implements ContainerDownloader {
5246
5347 private final Path workingDirectory ;
5448
55- private ExecutorService executor ;
56-
5749 public SimpleContainerDownloader (Configuration conf ) {
5850
5951 String workDirString =
@@ -65,12 +57,6 @@ public SimpleContainerDownloader(Configuration conf) {
6557 } else {
6658 workingDirectory = Paths .get (workDirString );
6759 }
68-
69- ThreadFactory build = new ThreadFactoryBuilder ().setDaemon (true )
70- .setNameFormat ("Container downloader thread - %d" ).build ();
71- executor = Executors .newSingleThreadExecutor (build );
72- LOG .info ("Starting container downloader service to copy "
73- + "containers to replicate." );
7460 }
7561
7662 @ Override
@@ -110,11 +96,7 @@ public CompletableFuture<Path> getContainerDataFromReplicas(long containerId,
11096 }
11197
11298 @ Override
113- public void close () throws IOException {
114- try {
115- executor .awaitTermination (10 , TimeUnit .SECONDS );
116- } catch (InterruptedException e ) {
117- LOG .error ("Can't stop container downloader gracefully" , e );
118- }
99+ public void close () {
100+ // noop
119101 }
120102}
0 commit comments