YARN-5718. TimelineClient (and other places in YARN) shouldn't over-write HDFS client retry settings which could cause unexpected behavior. Contributed by Junping Du.
This commit is contained in:
parent
b154d3edce
commit
b733a6f862
|
@ -695,10 +695,6 @@ public class YarnConfiguration extends Configuration {
|
||||||
/** URI for FileSystemRMStateStore */
|
/** URI for FileSystemRMStateStore */
|
||||||
public static final String FS_RM_STATE_STORE_URI = RM_PREFIX
|
public static final String FS_RM_STATE_STORE_URI = RM_PREFIX
|
||||||
+ "fs.state-store.uri";
|
+ "fs.state-store.uri";
|
||||||
public static final String FS_RM_STATE_STORE_RETRY_POLICY_SPEC = RM_PREFIX
|
|
||||||
+ "fs.state-store.retry-policy-spec";
|
|
||||||
public static final String DEFAULT_FS_RM_STATE_STORE_RETRY_POLICY_SPEC =
|
|
||||||
"2000, 500";
|
|
||||||
|
|
||||||
public static final String FS_RM_STATE_STORE_NUM_RETRIES =
|
public static final String FS_RM_STATE_STORE_NUM_RETRIES =
|
||||||
RM_PREFIX + "fs.state-store.num-retries";
|
RM_PREFIX + "fs.state-store.num-retries";
|
||||||
|
@ -1974,13 +1970,6 @@ public class YarnConfiguration extends Configuration {
|
||||||
TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_UNKNOWN_ACTIVE_SECONDS_DEFAULT
|
TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_UNKNOWN_ACTIVE_SECONDS_DEFAULT
|
||||||
= 24 * 60 * 60;
|
= 24 * 60 * 60;
|
||||||
|
|
||||||
public static final String
|
|
||||||
TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_RETRY_POLICY_SPEC =
|
|
||||||
TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_PREFIX + "retry-policy-spec";
|
|
||||||
public static final String
|
|
||||||
DEFAULT_TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_RETRY_POLICY_SPEC =
|
|
||||||
"2000, 500";
|
|
||||||
|
|
||||||
public static final String TIMELINE_SERVICE_LEVELDB_CACHE_READ_CACHE_SIZE =
|
public static final String TIMELINE_SERVICE_LEVELDB_CACHE_READ_CACHE_SIZE =
|
||||||
TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_PREFIX
|
TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_PREFIX
|
||||||
+ "leveldb-cache-read-cache-size";
|
+ "leveldb-cache-read-cache-size";
|
||||||
|
@ -2600,11 +2589,7 @@ public class YarnConfiguration extends Configuration {
|
||||||
/** URI for NodeLabelManager */
|
/** URI for NodeLabelManager */
|
||||||
public static final String FS_NODE_LABELS_STORE_ROOT_DIR = NODE_LABELS_PREFIX
|
public static final String FS_NODE_LABELS_STORE_ROOT_DIR = NODE_LABELS_PREFIX
|
||||||
+ "fs-store.root-dir";
|
+ "fs-store.root-dir";
|
||||||
public static final String FS_NODE_LABELS_STORE_RETRY_POLICY_SPEC =
|
|
||||||
NODE_LABELS_PREFIX + "fs-store.retry-policy-spec";
|
|
||||||
public static final String DEFAULT_FS_NODE_LABELS_STORE_RETRY_POLICY_SPEC =
|
|
||||||
"2000, 500";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to indicate if the node labels feature enabled, by default it's
|
* Flag to indicate if the node labels feature enabled, by default it's
|
||||||
* disabled
|
* disabled
|
||||||
|
|
|
@ -106,13 +106,6 @@ public class FileSystemTimelineWriter extends TimelineWriter{
|
||||||
super(authUgi, client, resURI);
|
super(authUgi, client, resURI);
|
||||||
|
|
||||||
Configuration fsConf = new Configuration(conf);
|
Configuration fsConf = new Configuration(conf);
|
||||||
fsConf.setBoolean("dfs.client.retry.policy.enabled", true);
|
|
||||||
String retryPolicy =
|
|
||||||
fsConf.get(YarnConfiguration.
|
|
||||||
TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_RETRY_POLICY_SPEC,
|
|
||||||
YarnConfiguration.
|
|
||||||
DEFAULT_TIMELINE_SERVICE_ENTITYGROUP_FS_STORE_RETRY_POLICY_SPEC);
|
|
||||||
fsConf.set("dfs.client.retry.policy.spec", retryPolicy);
|
|
||||||
|
|
||||||
activePath = new Path(fsConf.get(
|
activePath = new Path(fsConf.get(
|
||||||
YarnConfiguration
|
YarnConfiguration
|
||||||
|
|
|
@ -95,13 +95,8 @@ public class FileSystemNodeLabelsStore extends NodeLabelsStore {
|
||||||
|
|
||||||
void setFileSystem(Configuration conf) throws IOException {
|
void setFileSystem(Configuration conf) throws IOException {
|
||||||
Configuration confCopy = new Configuration(conf);
|
Configuration confCopy = new Configuration(conf);
|
||||||
confCopy.setBoolean("dfs.client.retry.policy.enabled", true);
|
|
||||||
String retryPolicy =
|
|
||||||
confCopy.get(YarnConfiguration.FS_NODE_LABELS_STORE_RETRY_POLICY_SPEC,
|
|
||||||
YarnConfiguration.DEFAULT_FS_NODE_LABELS_STORE_RETRY_POLICY_SPEC);
|
|
||||||
confCopy.set("dfs.client.retry.policy.spec", retryPolicy);
|
|
||||||
fs = fsWorkingPath.getFileSystem(confCopy);
|
fs = fsWorkingPath.getFileSystem(confCopy);
|
||||||
|
|
||||||
// if it's local file system, use RawLocalFileSystem instead of
|
// if it's local file system, use RawLocalFileSystem instead of
|
||||||
// LocalFileSystem, the latter one doesn't support append.
|
// LocalFileSystem, the latter one doesn't support append.
|
||||||
if (fs.getScheme().equals("file")) {
|
if (fs.getScheme().equals("file")) {
|
||||||
|
|
|
@ -521,16 +521,6 @@
|
||||||
<!--value>hdfs://localhost:9000/rmstore</value-->
|
<!--value>hdfs://localhost:9000/rmstore</value-->
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
<property>
|
|
||||||
<description>hdfs client retry policy specification. hdfs client retry
|
|
||||||
is always enabled. Specified in pairs of sleep-time and number-of-retries
|
|
||||||
and (t0, n0), (t1, n1), ..., the first n0 retries sleep t0 milliseconds on
|
|
||||||
average, the following n1 retries sleep t1 milliseconds on average, and so on.
|
|
||||||
</description>
|
|
||||||
<name>yarn.resourcemanager.fs.state-store.retry-policy-spec</name>
|
|
||||||
<value>2000, 500</value>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property>
|
<property>
|
||||||
<description>the number of retries to recover from IOException in
|
<description>the number of retries to recover from IOException in
|
||||||
FileSystemRMStateStore.
|
FileSystemRMStateStore.
|
||||||
|
@ -2481,16 +2471,6 @@
|
||||||
<value>false</value>
|
<value>false</value>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
<property>
|
|
||||||
<description>
|
|
||||||
Retry policy used for FileSystem node label store. The policy is
|
|
||||||
specified by N pairs of sleep-time in milliseconds and number-of-retries
|
|
||||||
"s1,n1,s2,n2,...".
|
|
||||||
</description>
|
|
||||||
<name>yarn.node-labels.fs-store.retry-policy-spec</name>
|
|
||||||
<value>2000, 500</value>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property>
|
<property>
|
||||||
<description>
|
<description>
|
||||||
URI for NodeLabelManager. The default value is
|
URI for NodeLabelManager. The default value is
|
||||||
|
|
|
@ -142,11 +142,6 @@ public class FileSystemRMStateStore extends RMStateStore {
|
||||||
// authenticated with kerberos so we are good to create a file-system
|
// authenticated with kerberos so we are good to create a file-system
|
||||||
// handle.
|
// handle.
|
||||||
fsConf = new Configuration(getConfig());
|
fsConf = new Configuration(getConfig());
|
||||||
fsConf.setBoolean("dfs.client.retry.policy.enabled", true);
|
|
||||||
String retryPolicy =
|
|
||||||
fsConf.get(YarnConfiguration.FS_RM_STATE_STORE_RETRY_POLICY_SPEC,
|
|
||||||
YarnConfiguration.DEFAULT_FS_RM_STATE_STORE_RETRY_POLICY_SPEC);
|
|
||||||
fsConf.set("dfs.client.retry.policy.spec", retryPolicy);
|
|
||||||
|
|
||||||
String scheme = fsWorkingPath.toUri().getScheme();
|
String scheme = fsWorkingPath.toUri().getScheme();
|
||||||
if (scheme == null) {
|
if (scheme == null) {
|
||||||
|
|
|
@ -113,8 +113,6 @@ public class TestFSRMStateStore extends RMStateStoreTestBase {
|
||||||
YarnConfiguration conf = new YarnConfiguration();
|
YarnConfiguration conf = new YarnConfiguration();
|
||||||
conf.set(YarnConfiguration.FS_RM_STATE_STORE_URI,
|
conf.set(YarnConfiguration.FS_RM_STATE_STORE_URI,
|
||||||
workingDirPathURI.toString());
|
workingDirPathURI.toString());
|
||||||
conf.set(YarnConfiguration.FS_RM_STATE_STORE_RETRY_POLICY_SPEC,
|
|
||||||
"100,6000");
|
|
||||||
conf.setInt(YarnConfiguration.FS_RM_STATE_STORE_NUM_RETRIES, 8);
|
conf.setInt(YarnConfiguration.FS_RM_STATE_STORE_NUM_RETRIES, 8);
|
||||||
conf.setLong(YarnConfiguration.FS_RM_STATE_STORE_RETRY_INTERVAL_MS,
|
conf.setLong(YarnConfiguration.FS_RM_STATE_STORE_RETRY_INTERVAL_MS,
|
||||||
900L);
|
900L);
|
||||||
|
@ -325,8 +323,6 @@ public class TestFSRMStateStore extends RMStateStoreTestBase {
|
||||||
YarnConfiguration conf = new YarnConfiguration();
|
YarnConfiguration conf = new YarnConfiguration();
|
||||||
conf.set(YarnConfiguration.FS_RM_STATE_STORE_URI,
|
conf.set(YarnConfiguration.FS_RM_STATE_STORE_URI,
|
||||||
workingDirPathURI.toString());
|
workingDirPathURI.toString());
|
||||||
conf.set(YarnConfiguration.FS_RM_STATE_STORE_RETRY_POLICY_SPEC,
|
|
||||||
"100,6000");
|
|
||||||
this.store = new TestFileSystemRMStore(conf) {
|
this.store = new TestFileSystemRMStore(conf) {
|
||||||
Version storedVersion = null;
|
Version storedVersion = null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue