abstractdog commented on code in PR #274:
URL: https://github.com/apache/tez/pull/274#discussion_r1148421781


##########
tez-runtime-internals/src/main/java/org/apache/tez/runtime/task/TezChild.java:
##########
@@ -503,6 +506,32 @@ public static TezChild newTezChild(Configuration conf, 
String host, int port, St
         hadoopShim);
   }
 
+  private static void eagerInitFileSystemPaths(Configuration conf) {
+    Collection<String> eagerInitPaths = conf.getTrimmedStringCollection(
+        TezConfiguration.TASK_EAGER_INIT_FS_PATHS);
+    if (eagerInitFsPool == null && !eagerInitPaths.isEmpty()) {
+      eagerInitFsPool = Executors.newCachedThreadPool(new 
ThreadFactoryBuilder()
+          .setDaemon(true)
+          .setPriority(Thread.MAX_PRIORITY)
+          .setNameFormat("Eager-Init-Fs-Thread-%d")
+          .build());
+    }
+    for (String path : eagerInitPaths) {
+      eagerInitFsPool.execute(new Runnable() {
+        @Override
+        public void run() {
+          try {
+            new Path(path).getFileSystem(conf);
+            LOG.info("Eagerly initiated FileSystem at path {}", path);

Review Comment:
   it would be nice to measure the time spent with initialization and print it 
to logs too



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to