jerryshao commented on code in PR #5406:
URL: https://github.com/apache/gravitino/pull/5406#discussion_r1824341558
##########
catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java:
##########
@@ -774,6 +778,27 @@ FileSystem getFileSystem(Path path, Map<String, String>
config) throws IOExcepti
scheme, path, fileSystemProvidersMap.keySet(),
fileSystemProvidersMap.values()));
}
- return provider.getFileSystem(path, config);
+ int timeoutSeconds =
+ (int)
+ propertiesMetadata
+ .catalogPropertiesMetadata()
+ .getOrDefault(config,
HadoopCatalogPropertiesMetadata.GET_FILESYSTEM_TIMEOUT_SECONDS);
+ try {
+ AtomicReference<FileSystem> fileSystem = new AtomicReference<>();
+ Awaitility.await()
+ .atMost(timeoutSeconds, TimeUnit.SECONDS)
+ .until(
+ () -> {
+ fileSystem.set(provider.getFileSystem(path, config));
Review Comment:
Why it is so time-consuming to initialize the filesystem client?
--
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]