shameersss1 commented on code in PR #274:
URL: https://github.com/apache/tez/pull/274#discussion_r1148784640
##########
tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java:
##########
@@ -1131,6 +1131,14 @@ public TezConfiguration(boolean loadDefaults) {
public static final int TASK_HEARTBEAT_TIMEOUT_CHECK_MS_DEFAULT = 30 * 1000;
+ /**
+ * String value. Comma seperated list of FileSystem paths which needs to be
eagerly initialized.
+ * For example s3://bucket/,file://,hdfs://localhost:8020/
+ */
+ @ConfigurationScope(Scope.AM)
Review Comment:
ack.
##########
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:
ack.
--
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]