yuqi1129 commented on code in PR #5406:
URL: https://github.com/apache/gravitino/pull/5406#discussion_r1824368270
##########
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:
If the user sets an incorrect endpoint, the client will retry to get the
connection for a certain amount of time.
--
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]