|
@@ -35,7 +35,6 @@ import java.util.Map.Entry;
|
|
|
import java.util.concurrent.Callable;
|
|
|
import java.util.concurrent.ExecutionException;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
-import java.util.concurrent.Executors;
|
|
|
import java.util.concurrent.Future;
|
|
|
import java.util.concurrent.ThreadFactory;
|
|
|
import java.util.concurrent.atomic.AtomicLong;
|
|
@@ -43,7 +42,6 @@ import java.util.concurrent.atomic.AtomicLong;
|
|
|
import org.apache.commons.logging.Log;
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
import org.apache.hadoop.fs.FileContext;
|
|
|
-import org.apache.hadoop.fs.FileSystem;
|
|
|
import org.apache.hadoop.fs.FileUtil;
|
|
|
import org.apache.hadoop.fs.LocalDirAllocator;
|
|
|
import org.apache.hadoop.fs.Path;
|
|
@@ -53,6 +51,7 @@ import org.apache.hadoop.mapreduce.filecache.DistributedCache;
|
|
|
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
|
|
import org.apache.hadoop.security.UserGroupInformation;
|
|
|
import org.apache.hadoop.util.StringUtils;
|
|
|
+import org.apache.hadoop.util.concurrent.HadoopExecutors;
|
|
|
import org.apache.hadoop.yarn.api.records.LocalResource;
|
|
|
import org.apache.hadoop.yarn.api.records.LocalResourceType;
|
|
|
import org.apache.hadoop.yarn.util.ConverterUtils;
|
|
@@ -121,7 +120,7 @@ class LocalDistributedCacheManager {
|
|
|
ThreadFactory tf = new ThreadFactoryBuilder()
|
|
|
.setNameFormat("LocalDistributedCacheManager Downloader #%d")
|
|
|
.build();
|
|
|
- exec = Executors.newCachedThreadPool(tf);
|
|
|
+ exec = HadoopExecutors.newCachedThreadPool(tf);
|
|
|
Path destPath = localDirAllocator.getLocalPathForWrite(".", conf);
|
|
|
Map<LocalResource, Future<Path>> resourcesToPaths = Maps.newHashMap();
|
|
|
for (LocalResource resource : localResources.values()) {
|