Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#5361] improvment(hadoop-catalog): Introduce a timeout mechanism to get Hadoop File System. #5406

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yuqi1129
Copy link
Contributor

What changes were proposed in this pull request?

Introduce a timeout mechanism when getting a Hadoop FileSystem instance.

Why are the changes needed?

Cloud filesystem like S3 and OSS(10 minutes) has a very long connection and can't be tune by configuration, this will cause deadlock as it will hold the tree lock for a long time

Fix: #5361

Does this PR introduce any user-facing change?

N/A.

How was this patch tested?

Existing test.

@yuqi1129
Copy link
Contributor Author

@jerryshao
Please help look if this should be included in release 0.7.0.

.atMost(timeoutSeconds, TimeUnit.SECONDS)
.until(
() -> {
fileSystem.set(provider.getFileSystem(path, config));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it is so time-consuming to initialize the filesystem client?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the user sets an incorrect endpoint, the client will retry to get the connection for a certain amount of time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you really fix this problem without using another thread to create a FS and polling the status asynchronously?

@yuqi1129 yuqi1129 self-assigned this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[improvement] Introduce timeout mechanism for catalog connection
2 participants