YARN-4320. TestJobHistoryEventHandler fails as AHS in MiniYarnCluster no longer binds to default port 8188. Contributed by Varun Saxena.
(cherry picked from commit ce31b22739
)
This commit is contained in:
parent
dd144035a0
commit
1c80473a41
|
@ -489,9 +489,6 @@ public class TestJobHistoryEventHandler {
|
||||||
TestParams t = new TestParams(false);
|
TestParams t = new TestParams(false);
|
||||||
Configuration conf = new YarnConfiguration();
|
Configuration conf = new YarnConfiguration();
|
||||||
conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
|
conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
|
||||||
conf.setBoolean(MRJobConfig.MAPREDUCE_JOB_EMIT_TIMELINE_DATA, true);
|
|
||||||
JHEvenHandlerForTest jheh = new JHEvenHandlerForTest(t.mockAppContext, 0);
|
|
||||||
jheh.init(conf);
|
|
||||||
MiniYARNCluster yarnCluster = null;
|
MiniYARNCluster yarnCluster = null;
|
||||||
long currentTime = System.currentTimeMillis();
|
long currentTime = System.currentTimeMillis();
|
||||||
try {
|
try {
|
||||||
|
@ -499,6 +496,13 @@ public class TestJobHistoryEventHandler {
|
||||||
TestJobHistoryEventHandler.class.getSimpleName(), 1, 1, 1, 1);
|
TestJobHistoryEventHandler.class.getSimpleName(), 1, 1, 1, 1);
|
||||||
yarnCluster.init(conf);
|
yarnCluster.init(conf);
|
||||||
yarnCluster.start();
|
yarnCluster.start();
|
||||||
|
Configuration confJHEH = new YarnConfiguration(conf);
|
||||||
|
confJHEH.setBoolean(MRJobConfig.MAPREDUCE_JOB_EMIT_TIMELINE_DATA, true);
|
||||||
|
confJHEH.set(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS,
|
||||||
|
MiniYARNCluster.getHostname() + ":" +
|
||||||
|
yarnCluster.getApplicationHistoryServer().getPort());
|
||||||
|
JHEvenHandlerForTest jheh = new JHEvenHandlerForTest(t.mockAppContext, 0);
|
||||||
|
jheh.init(confJHEH);
|
||||||
jheh.start();
|
jheh.start();
|
||||||
TimelineStore ts = yarnCluster.getApplicationHistoryServer()
|
TimelineStore ts = yarnCluster.getApplicationHistoryServer()
|
||||||
.getTimelineStore();
|
.getTimelineStore();
|
||||||
|
|
|
@ -1098,6 +1098,9 @@ Release 2.7.2 - UNRELEASED
|
||||||
YARN-4312. TestSubmitApplicationWithRMHA fails on branch-2.7 and branch-2.6
|
YARN-4312. TestSubmitApplicationWithRMHA fails on branch-2.7 and branch-2.6
|
||||||
as some of the test cases time out. (Varun Saxena via ozawa)
|
as some of the test cases time out. (Varun Saxena via ozawa)
|
||||||
|
|
||||||
|
YARN-4320. TestJobHistoryEventHandler fails as AHS in MiniYarnCluster no longer
|
||||||
|
binds to default port 8188. (Varun Saxena via ozawa)
|
||||||
|
|
||||||
Release 2.7.1 - 2015-07-06
|
Release 2.7.1 - 2015-07-06
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -143,7 +143,7 @@ public class ApplicationHistoryServer extends CompositeService {
|
||||||
|
|
||||||
@Private
|
@Private
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
int getPort() {
|
public int getPort() {
|
||||||
return this.webApp.httpServer().getConnectorAddress(0).getPort();
|
return this.webApp.httpServer().getConnectorAddress(0).getPort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue