HDFS-15107. dfs.client.server-defaults.validity.period.ms to support time units. Contributed by Ayush Saxena.
This commit is contained in:
parent
782c0556fb
commit
b32757c616
@ -375,9 +375,10 @@ public DFSClient(URI nameNodeUri, ClientProtocol rpcNamenode,
|
|||||||
null : conf.getBoolean(DFS_CLIENT_CACHE_DROP_BEHIND_READS, false);
|
null : conf.getBoolean(DFS_CLIENT_CACHE_DROP_BEHIND_READS, false);
|
||||||
Long readahead = (conf.get(DFS_CLIENT_CACHE_READAHEAD) == null) ?
|
Long readahead = (conf.get(DFS_CLIENT_CACHE_READAHEAD) == null) ?
|
||||||
null : conf.getLongBytes(DFS_CLIENT_CACHE_READAHEAD, 0);
|
null : conf.getLongBytes(DFS_CLIENT_CACHE_READAHEAD, 0);
|
||||||
this.serverDefaultsValidityPeriod =
|
this.serverDefaultsValidityPeriod = conf.getTimeDuration(
|
||||||
conf.getLong(DFS_CLIENT_SERVER_DEFAULTS_VALIDITY_PERIOD_MS_KEY,
|
DFS_CLIENT_SERVER_DEFAULTS_VALIDITY_PERIOD_MS_KEY,
|
||||||
DFS_CLIENT_SERVER_DEFAULTS_VALIDITY_PERIOD_MS_DEFAULT);
|
DFS_CLIENT_SERVER_DEFAULTS_VALIDITY_PERIOD_MS_DEFAULT,
|
||||||
|
TimeUnit.MILLISECONDS);
|
||||||
Boolean writeDropBehind =
|
Boolean writeDropBehind =
|
||||||
(conf.get(DFS_CLIENT_CACHE_DROP_BEHIND_WRITES) == null) ?
|
(conf.get(DFS_CLIENT_CACHE_DROP_BEHIND_WRITES) == null) ?
|
||||||
null : conf.getBoolean(DFS_CLIENT_CACHE_DROP_BEHIND_WRITES, false);
|
null : conf.getBoolean(DFS_CLIENT_CACHE_DROP_BEHIND_WRITES, false);
|
||||||
|
@ -167,9 +167,10 @@ public class RouterClientProtocol implements ClientProtocol {
|
|||||||
RBFConfigKeys.DFS_ROUTER_CLIENT_MOUNT_TIME_OUT,
|
RBFConfigKeys.DFS_ROUTER_CLIENT_MOUNT_TIME_OUT,
|
||||||
RBFConfigKeys.DFS_ROUTER_CLIENT_MOUNT_TIME_OUT_DEFAULT,
|
RBFConfigKeys.DFS_ROUTER_CLIENT_MOUNT_TIME_OUT_DEFAULT,
|
||||||
TimeUnit.MILLISECONDS);
|
TimeUnit.MILLISECONDS);
|
||||||
this.serverDefaultsValidityPeriod = conf.getLong(
|
this.serverDefaultsValidityPeriod = conf.getTimeDuration(
|
||||||
DFS_CLIENT_SERVER_DEFAULTS_VALIDITY_PERIOD_MS_KEY,
|
DFS_CLIENT_SERVER_DEFAULTS_VALIDITY_PERIOD_MS_KEY,
|
||||||
DFS_CLIENT_SERVER_DEFAULTS_VALIDITY_PERIOD_MS_DEFAULT);
|
DFS_CLIENT_SERVER_DEFAULTS_VALIDITY_PERIOD_MS_DEFAULT,
|
||||||
|
TimeUnit.MILLISECONDS);
|
||||||
// User and group for reporting
|
// User and group for reporting
|
||||||
try {
|
try {
|
||||||
this.superUser = UserGroupInformation.getCurrentUser().getShortUserName();
|
this.superUser = UserGroupInformation.getCurrentUser().getShortUserName();
|
||||||
|
@ -2548,6 +2548,8 @@
|
|||||||
The amount of milliseconds after which cached server defaults are updated.
|
The amount of milliseconds after which cached server defaults are updated.
|
||||||
|
|
||||||
By default this parameter is set to 1 hour.
|
By default this parameter is set to 1 hour.
|
||||||
|
Support multiple time unit suffix(case insensitive), as described
|
||||||
|
in dfs.heartbeat.interval.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user