Rebase to latest trunk
This commit is contained in:
parent
88f0294114
commit
34f02f07d5
|
@ -250,6 +250,14 @@
|
|||
<artifactId>hadoop-yarn-server-tests</artifactId>
|
||||
<scope>test</scope>
|
||||
<type>test-jar</type>
|
||||
<exclusions>
|
||||
<!-- server-tests brings in an older version of joda-time via
|
||||
timeline service -->
|
||||
<exclusion>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
|
|
|
@ -335,8 +335,8 @@ public class TimelineClientImpl extends TimelineClient {
|
|||
@Override
|
||||
protected void serviceStart() throws Exception {
|
||||
timelineWriter = createTimelineWriter(
|
||||
configuration, authUgi, client, constructResURI(getConfig(),
|
||||
getTimelineServiceAddress(), false));
|
||||
configuration, authUgi, client,
|
||||
constructResURI(getConfig(), timelineServiceAddress, false));
|
||||
}
|
||||
|
||||
protected TimelineWriter createTimelineWriter(Configuration conf,
|
||||
|
|
|
@ -88,6 +88,17 @@ public class TimelineServiceV1Publisher extends AbstractSystemMetricsPublisher {
|
|||
app.getAmNodeLabelExpression());
|
||||
entityInfo.put(ApplicationMetricsConstants.APP_NODE_LABEL_EXPRESSION,
|
||||
app.getAppNodeLabelExpression());
|
||||
if (app.getCallerContext() != null) {
|
||||
if (app.getCallerContext().getContext() != null) {
|
||||
entityInfo.put(ApplicationMetricsConstants.YARN_APP_CALLER_CONTEXT,
|
||||
app.getCallerContext().getContext());
|
||||
}
|
||||
if (app.getCallerContext().getSignature() != null) {
|
||||
entityInfo.put(ApplicationMetricsConstants.YARN_APP_CALLER_SIGNATURE,
|
||||
app.getCallerContext().getSignature());
|
||||
}
|
||||
}
|
||||
|
||||
entity.setOtherInfo(entityInfo);
|
||||
TimelineEvent tEvent = new TimelineEvent();
|
||||
tEvent.setEventType(ApplicationMetricsConstants.CREATED_EVENT_TYPE);
|
||||
|
@ -200,8 +211,10 @@ public class TimelineServiceV1Publisher extends AbstractSystemMetricsPublisher {
|
|||
appAttempt.getHost());
|
||||
eventInfo.put(AppAttemptMetricsConstants.RPC_PORT_EVENT_INFO,
|
||||
appAttempt.getRpcPort());
|
||||
if (appAttempt.getMasterContainer() != null) {
|
||||
eventInfo.put(AppAttemptMetricsConstants.MASTER_CONTAINER_EVENT_INFO,
|
||||
appAttempt.getMasterContainer().getId().toString());
|
||||
}
|
||||
tEvent.setEventInfo(eventInfo);
|
||||
entity.addEvent(tEvent);
|
||||
getDispatcher().getEventHandler().handle(
|
||||
|
|
|
@ -118,8 +118,18 @@ public class TimelineServiceV2Publisher extends AbstractSystemMetricsPublisher {
|
|||
entity.getConfigs().put(
|
||||
ApplicationMetricsConstants.APP_NODE_LABEL_EXPRESSION,
|
||||
app.getAppNodeLabelExpression());
|
||||
entity.setInfo(entityInfo);
|
||||
if (app.getCallerContext() != null) {
|
||||
if (app.getCallerContext().getContext() != null) {
|
||||
entityInfo.put(ApplicationMetricsConstants.YARN_APP_CALLER_CONTEXT,
|
||||
app.getCallerContext().getContext());
|
||||
}
|
||||
if (app.getCallerContext().getSignature() != null) {
|
||||
entityInfo.put(ApplicationMetricsConstants.YARN_APP_CALLER_SIGNATURE,
|
||||
app.getCallerContext().getSignature());
|
||||
}
|
||||
}
|
||||
|
||||
entity.setInfo(entityInfo);
|
||||
TimelineEvent tEvent = new TimelineEvent();
|
||||
tEvent.setId(ApplicationMetricsConstants.CREATED_EVENT_TYPE);
|
||||
tEvent.setTimestamp(createdTime);
|
||||
|
@ -240,8 +250,10 @@ public class TimelineServiceV2Publisher extends AbstractSystemMetricsPublisher {
|
|||
appAttempt.getHost());
|
||||
eventInfo.put(AppAttemptMetricsConstants.RPC_PORT_EVENT_INFO,
|
||||
appAttempt.getRpcPort());
|
||||
if (appAttempt.getMasterContainer() != null) {
|
||||
eventInfo.put(AppAttemptMetricsConstants.MASTER_CONTAINER_EVENT_INFO,
|
||||
appAttempt.getMasterContainer().getId().toString());
|
||||
}
|
||||
tEvent.setInfo(eventInfo);
|
||||
entity.addEvent(tEvent);
|
||||
getDispatcher().getEventHandler().handle(
|
||||
|
|
|
@ -915,8 +915,10 @@ public class TestResourceTrackerService extends NodeLabelTestBase {
|
|||
statusList.add(status1);
|
||||
NodeHealthStatus nodeHealth = NodeHealthStatus.newInstance(true,
|
||||
"", System.currentTimeMillis());
|
||||
node1.handle(new RMNodeStatusEvent(nm1.getNodeId(), nodeHealth,
|
||||
statusList, null, nodeHeartbeat1));
|
||||
NodeStatus nodeStatus = NodeStatus.newInstance(nm1.getNodeId(), 0,
|
||||
statusList, null, nodeHealth, null, null, null);
|
||||
node1.handle(new RMNodeStatusEvent(nm1.getNodeId(), nodeStatus,
|
||||
nodeHeartbeat1));
|
||||
|
||||
Assert.assertEquals(1, node1.getRunningApps().size());
|
||||
Assert.assertEquals(app1.getApplicationId(), node1.getRunningApps().get(0));
|
||||
|
@ -930,8 +932,10 @@ public class TestResourceTrackerService extends NodeLabelTestBase {
|
|||
ContainerState.RUNNING, "", 0);
|
||||
statusList = new ArrayList<ContainerStatus>();
|
||||
statusList.add(status2);
|
||||
node2.handle(new RMNodeStatusEvent(nm2.getNodeId(), nodeHealth,
|
||||
statusList, null, nodeHeartbeat2));
|
||||
nodeStatus = NodeStatus.newInstance(nm1.getNodeId(), 0,
|
||||
statusList, null, nodeHealth, null, null, null);
|
||||
node2.handle(new RMNodeStatusEvent(nm2.getNodeId(), nodeStatus,
|
||||
nodeHeartbeat2));
|
||||
Assert.assertEquals(1, node2.getRunningApps().size());
|
||||
Assert.assertEquals(app2.getApplicationId(), node2.getRunningApps().get(0));
|
||||
|
||||
|
|
|
@ -124,12 +124,6 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.phoenix</groupId>
|
||||
<artifactId>phoenix-core</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase</groupId>
|
||||
|
|
Loading…
Reference in New Issue