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

Implement HADOOP-18671 changes #3494

Open
dlmarion opened this issue Jun 14, 2023 · 2 comments · May be fixed by #5241
Open

Implement HADOOP-18671 changes #3494

dlmarion opened this issue Jun 14, 2023 · 2 comments · May be fixed by #5241
Labels
enhancement This issue describes a new feature, improvement, or optimization.
Milestone

Comments

@dlmarion
Copy link
Contributor

HADOOP-18671 moves recoverLease and setSafeMode up to the interface level. We call these methods here and here. This will require a Hadoop version bump to 3.3.6 when it's released.

@dlmarion dlmarion added the enhancement This issue describes a new feature, improvement, or optimization. label Jun 14, 2023
@dlmarion
Copy link
Contributor Author

I believe the code should change to:

recoverLease:

Path path;
FileSystem fs;

if (fs.hasPathCapability(path, CommonPathCapabilities.LEASE_RECOVERABLE)) {
  ((LeaseRecoverable) fs).recoverLease(path);
}

setSafeMode:

FileSystem fs;

if (fs instanceof SafeMode) {
  ((SafeMode) fs).setSafeMode(SafeModeAction.GET);
}

@dlmarion
Copy link
Contributor Author

Hadoop 3.3.6 has been released. We could add this in 3.0.0 now

@ctubbsii ctubbsii added this to the 3.1.0 milestone Jul 12, 2024
dlmarion added a commit to dlmarion/accumulo that referenced this issue Jan 9, 2025
This change uses FileSystem.hasPathCapability to determine if the
FileSystem implementation has the ability to recover leases.

Closes apache#3494
@dlmarion dlmarion linked a pull request Jan 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue describes a new feature, improvement, or optimization.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants