Rebase onto trunk - fix some issues. Contributed by Rohith Sharma K S
This commit is contained in:
parent
e660e52a04
commit
eed9e3e8f4
|
@ -19,7 +19,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>hadoop-yarn-applications</artifactId>
|
<artifactId>hadoop-yarn-applications</artifactId>
|
||||||
<version>3.0.0-beta1-SNAPSHOT</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>hadoop-yarn-services-api</artifactId>
|
<artifactId>hadoop-yarn-services-api</artifactId>
|
||||||
<name>Apache Hadoop YARN Services API</name>
|
<name>Apache Hadoop YARN Services API</name>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>hadoop-yarn-services</artifactId>
|
<artifactId>hadoop-yarn-services</artifactId>
|
||||||
<version>3.0.0-beta1-SNAPSHOT</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>hadoop-yarn-services-core</artifactId>
|
<artifactId>hadoop-yarn-services-core</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
|
@ -66,6 +66,7 @@ public class ServiceTimelinePublisher extends CompositeService {
|
||||||
protected void serviceInit(org.apache.hadoop.conf.Configuration configuration)
|
protected void serviceInit(org.apache.hadoop.conf.Configuration configuration)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
addService(timelineClient);
|
addService(timelineClient);
|
||||||
|
super.serviceInit(configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,8 +96,8 @@ public void serviceAttemptRegistered(Service service,
|
||||||
// create info keys
|
// create info keys
|
||||||
Map<String, Object> entityInfos = new HashMap<String, Object>();
|
Map<String, Object> entityInfos = new HashMap<String, Object>();
|
||||||
entityInfos.put(ServiceTimelineMetricsConstants.NAME, service.getName());
|
entityInfos.put(ServiceTimelineMetricsConstants.NAME, service.getName());
|
||||||
entityInfos.put(ServiceTimelineMetricsConstants.STATE,
|
// entityInfos.put(ServiceTimelineMetricsConstants.STATE,
|
||||||
service.getState().toString());
|
// service.getState().toString());
|
||||||
entityInfos.put(ServiceTimelineMetricsConstants.LAUNCH_TIME,
|
entityInfos.put(ServiceTimelineMetricsConstants.LAUNCH_TIME,
|
||||||
currentTimeMillis);
|
currentTimeMillis);
|
||||||
entity.addInfo(ServiceTimelineMetricsConstants.QUICK_LINKS,
|
entity.addInfo(ServiceTimelineMetricsConstants.QUICK_LINKS,
|
||||||
|
@ -232,18 +233,23 @@ private void publishComponents(List<Component> components) {
|
||||||
|
|
||||||
// create info keys
|
// create info keys
|
||||||
Map<String, Object> entityInfos = new HashMap<String, Object>();
|
Map<String, Object> entityInfos = new HashMap<String, Object>();
|
||||||
|
if (component.getArtifact() != null) {
|
||||||
entityInfos.put(ServiceTimelineMetricsConstants.ARTIFACT_ID,
|
entityInfos.put(ServiceTimelineMetricsConstants.ARTIFACT_ID,
|
||||||
component.getArtifact().getId());
|
component.getArtifact().getId());
|
||||||
entityInfos.put(ServiceTimelineMetricsConstants.ARTIFACT_TYPE,
|
entityInfos.put(ServiceTimelineMetricsConstants.ARTIFACT_TYPE,
|
||||||
component.getArtifact().getType().toString());
|
component.getArtifact().getType().toString());
|
||||||
if (component.getResource().getProfile() != null) {
|
|
||||||
entityInfos.put(ServiceTimelineMetricsConstants.RESOURCE_PROFILE,
|
|
||||||
component.getResource().getProfile());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (component.getResource() != null) {
|
||||||
entityInfos.put(ServiceTimelineMetricsConstants.RESOURCE_CPU,
|
entityInfos.put(ServiceTimelineMetricsConstants.RESOURCE_CPU,
|
||||||
component.getResource().getCpus());
|
component.getResource().getCpus());
|
||||||
entityInfos.put(ServiceTimelineMetricsConstants.RESOURCE_MEMORY,
|
entityInfos.put(ServiceTimelineMetricsConstants.RESOURCE_MEMORY,
|
||||||
component.getResource().getMemory());
|
component.getResource().getMemory());
|
||||||
|
if (component.getResource().getProfile() != null) {
|
||||||
|
entityInfos.put(ServiceTimelineMetricsConstants.RESOURCE_PROFILE,
|
||||||
|
component.getResource().getProfile());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (component.getLaunchCommand() != null) {
|
if (component.getLaunchCommand() != null) {
|
||||||
entityInfos.put(ServiceTimelineMetricsConstants.LAUNCH_COMMAND,
|
entityInfos.put(ServiceTimelineMetricsConstants.LAUNCH_COMMAND,
|
||||||
|
|
|
@ -82,9 +82,7 @@ public void setUp() throws Exception {
|
||||||
timelineClient =
|
timelineClient =
|
||||||
new DummyTimelineClient(ApplicationId.fromString(SERVICEID));
|
new DummyTimelineClient(ApplicationId.fromString(SERVICEID));
|
||||||
serviceTimelinePublisher = new ServiceTimelinePublisher(timelineClient);
|
serviceTimelinePublisher = new ServiceTimelinePublisher(timelineClient);
|
||||||
timelineClient.init(config);
|
|
||||||
serviceTimelinePublisher.init(config);
|
serviceTimelinePublisher.init(config);
|
||||||
timelineClient.start();
|
|
||||||
serviceTimelinePublisher.start();
|
serviceTimelinePublisher.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>hadoop-yarn-applications</artifactId>
|
<artifactId>hadoop-yarn-applications</artifactId>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<version>3.0.0-beta1-SNAPSHOT</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>hadoop-yarn-services</artifactId>
|
<artifactId>hadoop-yarn-services</artifactId>
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default AbstractRoute.extend({
|
||||||
model() {
|
model() {
|
||||||
return Ember.RSVP.hash({
|
return Ember.RSVP.hash({
|
||||||
apps: this.store.query('yarn-app', {
|
apps: this.store.query('yarn-app', {
|
||||||
applicationTypes: "yarn-native-service"
|
applicationTypes: "yarn-service"
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue