-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-17685: Option to explicitly choose DFS client lease renewal interval #7215
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3444,6 +3444,16 @@ | |
</description> | ||
</property> | ||
|
||
<property> | ||
<name>dfs.client.lease.renewal.interval.ms</name> | ||
<value>0</value> | ||
<description> | ||
If set between 0 and 30000 inclusive, HDFS clients will renew leases for files they are writing at this interval. | ||
If dfs.client.lease.renewal.interval.ms is not set and ipc.client.rpc-timeout.ms is set between 0 and 60000, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is magic about the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It comes from existing behavior, yes. The lease renewal interval isn't allowed to be longer than half of the NameNode's timeout, which is hard-coded at 60 seconds. |
||
then the value of ipc.client.rpc-timeout.ms / 2 will be used as the lease renewal interval. | ||
</description> | ||
</property> | ||
|
||
<property> | ||
<name>dfs.client.refresh.read-block-locations.ms</name> | ||
<value>0</value> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you combine the two loop to one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I think it would make the code more complicated. The logic I want is that the lowest valid value from
getLeaseRenewalIntervalMs()
takes precedence over any value fromgetHdfsTimeout()
. So, doing that in one loop would require tracking twomin
s.