YARN-6323. Rolling upgrade/config change is broken on timeline v2. (Vrushali C via Haibo Chen)

This commit is contained in:
Haibo Chen 2017-08-21 10:45:10 -07:00 committed by Varun Saxena
parent b2efebdd07
commit 9b08f365d7
2 changed files with 12 additions and 0 deletions

View File

@ -2221,6 +2221,8 @@ public static boolean isAclEnabled(Configuration conf) {
public static final int DEFAULT_NUMBER_OF_ASYNC_ENTITIES_TO_MERGE = 10;
/** default version for any flow. */
public static final String DEFAULT_FLOW_VERSION = "1";
/**
* The time period for which timeline v2 client will wait for draining

View File

@ -402,6 +402,16 @@ private void recoverApplication(ContainerManagerApplicationProto p)
LOG.debug(
"Recovering Flow context: " + fc + " for an application " + appId);
}
} else {
// in upgrade situations, where there is no prior existing flow context,
// default would be used.
fc = new FlowContext(TimelineUtils.generateDefaultFlowName(null, appId),
YarnConfiguration.DEFAULT_FLOW_VERSION, appId.getClusterTimestamp());
if (LOG.isDebugEnabled()) {
LOG.debug(
"No prior existing flow context found. Using default Flow context: "
+ fc + " for an application " + appId);
}
}
LOG.info("Recovering application " + appId);