|
@@ -166,6 +166,7 @@ public class DfsClientConf {
|
|
|
|
|
|
private final boolean deadNodeDetectionEnabled;
|
|
private final boolean deadNodeDetectionEnabled;
|
|
private final long leaseHardLimitPeriod;
|
|
private final long leaseHardLimitPeriod;
|
|
|
|
+ private final boolean recoverLeaseOnCloseException;
|
|
|
|
|
|
public DfsClientConf(Configuration conf) {
|
|
public DfsClientConf(Configuration conf) {
|
|
// The hdfsTimeout is currently the same as the ipc timeout
|
|
// The hdfsTimeout is currently the same as the ipc timeout
|
|
@@ -315,6 +316,11 @@ public class DfsClientConf {
|
|
HdfsClientConfigKeys.DFS_CLIENT_PIPELINE_RECOVERY_MAX_RETRIES,
|
|
HdfsClientConfigKeys.DFS_CLIENT_PIPELINE_RECOVERY_MAX_RETRIES,
|
|
HdfsClientConfigKeys.DFS_CLIENT_PIPELINE_RECOVERY_MAX_RETRIES_DEFAULT
|
|
HdfsClientConfigKeys.DFS_CLIENT_PIPELINE_RECOVERY_MAX_RETRIES_DEFAULT
|
|
);
|
|
);
|
|
|
|
+
|
|
|
|
+ recoverLeaseOnCloseException = conf.getBoolean(
|
|
|
|
+ Write.RECOVER_LEASE_ON_CLOSE_EXCEPTION_KEY,
|
|
|
|
+ Write.RECOVER_LEASE_ON_CLOSE_EXCEPTION_DEFAULT
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
private ByteArrayManager.Conf loadWriteByteArrayManagerConf(
|
|
private ByteArrayManager.Conf loadWriteByteArrayManagerConf(
|
|
@@ -745,6 +751,10 @@ public class DfsClientConf {
|
|
return maxPipelineRecoveryRetries;
|
|
return maxPipelineRecoveryRetries;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public boolean getRecoverLeaseOnCloseException() {
|
|
|
|
+ return recoverLeaseOnCloseException;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Configuration for short-circuit reads.
|
|
* Configuration for short-circuit reads.
|
|
*/
|
|
*/
|