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

Periodic lease renewal #153

Closed
wants to merge 1 commit into from
Closed

Periodic lease renewal #153

wants to merge 1 commit into from

Conversation

efirs
Copy link
Contributor

@efirs efirs commented Sep 25, 2018

Renew HDFS file lease every 30sec to allow file write for longer than 1 hour.

Resolves: #60

@colinmarc
Copy link
Owner

Hi @efirs!

I think this is generally a good idea, but there are a couple problems to solve here:

  • This should certainly be on NamenodeConnection, not on Client.
  • NamenodeConnection.Execute isn't generally thread-safe.

Renew HDFS file lease every 30 seconds to allow file write for longer than 1 hour.

Reviewed By: Himank Chaudhary <himank@uber.com>

Signed-off-by: Evgeniy Firsov <firsov@uber.com>
@efirs
Copy link
Contributor Author

efirs commented Sep 26, 2018

Lease renew command is per client. It renews the leases of all files opened by the client.
The fix has optimization (similar to Java client), when it renews the lease only when there is at least one file opened for write. Client is responsible for opening files for write, so client is the proper place for lease renewal code.

NamenodeConnection.Execute is thread-safe.

boiler pushed a commit to boiler/hdfs that referenced this pull request Jul 11, 2019
Renew HDFS file lease every 30 seconds to allow file write for longer than 1 hour.

Origin: colinmarc#153
@colinmarc
Copy link
Owner

Fixed in 574b0ba. Thanks for your patience and work on this!

@colinmarc colinmarc closed this Nov 23, 2019
@efirs efirs deleted the lease_renew branch November 25, 2019 21:37
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.

2 participants