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