YARN-7760. [UI2] Clicking 'Master Node' or link next to 'AM Node Web UI' under application's appAttempt page goes to OLD RM UI. (Vasudevan Skm / Sunil G via wangda)
Change-Id: Ia7e2b955d3551ca43c6852fe253fd01983b56565
This commit is contained in:
parent
e0cfb0a31a
commit
75618c0dec
@ -92,6 +92,7 @@ public class AppInfo {
|
|||||||
protected String amContainerLogs;
|
protected String amContainerLogs;
|
||||||
protected String amHostHttpAddress;
|
protected String amHostHttpAddress;
|
||||||
private String amRPCAddress;
|
private String amRPCAddress;
|
||||||
|
private String masterNodeId;
|
||||||
private long allocatedMB;
|
private long allocatedMB;
|
||||||
private long allocatedVCores;
|
private long allocatedVCores;
|
||||||
private long reservedMB;
|
private long reservedMB;
|
||||||
@ -162,6 +163,7 @@ public AppInfo(ResourceManager rm, RMApp app, Boolean hasAccess,
|
|||||||
this.name = app.getName().toString();
|
this.name = app.getName().toString();
|
||||||
this.queue = app.getQueue().toString();
|
this.queue = app.getQueue().toString();
|
||||||
this.priority = 0;
|
this.priority = 0;
|
||||||
|
this.masterNodeId = "";
|
||||||
|
|
||||||
if (app.getApplicationPriority() != null) {
|
if (app.getApplicationPriority() != null) {
|
||||||
this.priority = app.getApplicationPriority().getPriority();
|
this.priority = app.getApplicationPriority().getPriority();
|
||||||
@ -192,6 +194,7 @@ public AppInfo(ResourceManager rm, RMApp app, Boolean hasAccess,
|
|||||||
schemePrefix + masterContainer.getNodeHttpAddress(),
|
schemePrefix + masterContainer.getNodeHttpAddress(),
|
||||||
masterContainer.getId().toString(), app.getUser());
|
masterContainer.getId().toString(), app.getUser());
|
||||||
this.amHostHttpAddress = masterContainer.getNodeHttpAddress();
|
this.amHostHttpAddress = masterContainer.getNodeHttpAddress();
|
||||||
|
this.masterNodeId = masterContainer.getNodeId().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.amRPCAddress = getAmRPCAddressFromRMAppAttempt(attempt);
|
this.amRPCAddress = getAmRPCAddressFromRMAppAttempt(attempt);
|
||||||
@ -615,4 +618,12 @@ public void setState(YarnApplicationState state) {
|
|||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMasterNodeId() {
|
||||||
|
return masterNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMasterNodeId(String masterNodeId) {
|
||||||
|
this.masterNodeId = masterNodeId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1603,7 +1603,7 @@ public void verifyAppsXML(NodeList nodes, RMApp app, boolean hasResourceReq)
|
|||||||
public void verifyAppInfo(JSONObject info, RMApp app, boolean hasResourceReqs)
|
public void verifyAppInfo(JSONObject info, RMApp app, boolean hasResourceReqs)
|
||||||
throws JSONException, Exception {
|
throws JSONException, Exception {
|
||||||
|
|
||||||
int expectedNumberOfElements = 38 + (hasResourceReqs ? 2 : 0);
|
int expectedNumberOfElements = 39 + (hasResourceReqs ? 2 : 0);
|
||||||
String appNodeLabelExpression = null;
|
String appNodeLabelExpression = null;
|
||||||
String amNodeLabelExpression = null;
|
String amNodeLabelExpression = null;
|
||||||
if (app.getApplicationSubmissionContext()
|
if (app.getApplicationSubmissionContext()
|
||||||
|
@ -20,42 +20,43 @@ import Converter from 'yarn-ui/utils/converter';
|
|||||||
import DS from 'ember-data';
|
import DS from 'ember-data';
|
||||||
|
|
||||||
export default DS.Model.extend({
|
export default DS.Model.extend({
|
||||||
appName: DS.attr('string'),
|
appName: DS.attr("string"),
|
||||||
user: DS.attr('string'),
|
user: DS.attr("string"),
|
||||||
queue: DS.attr('string'),
|
queue: DS.attr("string"),
|
||||||
state: DS.attr('string'),
|
state: DS.attr("string"),
|
||||||
startTime: DS.attr('string'),
|
startTime: DS.attr("string"),
|
||||||
elapsedTime: DS.attr('string'),
|
elapsedTime: DS.attr("string"),
|
||||||
finalStatus: DS.attr('string'),
|
finalStatus: DS.attr("string"),
|
||||||
finishedTime: DS.attr('finishedTime'),
|
finishedTime: DS.attr("finishedTime"),
|
||||||
progress: DS.attr('number'),
|
progress: DS.attr("number"),
|
||||||
diagnostics: DS.attr('string'),
|
diagnostics: DS.attr("string"),
|
||||||
amContainerLogs: DS.attr('string'),
|
amContainerLogs: DS.attr("string"),
|
||||||
amHostHttpAddress: DS.attr('string'),
|
amHostHttpAddress: DS.attr("string"),
|
||||||
logAggregationStatus: DS.attr('string'),
|
masterNodeId: DS.attr("string"),
|
||||||
unmanagedApplication: DS.attr('boolean'),
|
logAggregationStatus: DS.attr("string"),
|
||||||
amNodeLabelExpression: DS.attr('string'),
|
unmanagedApplication: DS.attr("boolean"),
|
||||||
applicationTags: DS.attr('string'),
|
amNodeLabelExpression: DS.attr("string"),
|
||||||
applicationType: DS.attr('string'),
|
applicationTags: DS.attr("string"),
|
||||||
priority: DS.attr('string'),
|
applicationType: DS.attr("string"),
|
||||||
allocatedMB: DS.attr('number'),
|
priority: DS.attr("string"),
|
||||||
allocatedVCores: DS.attr('number'),
|
allocatedMB: DS.attr("number"),
|
||||||
runningContainers: DS.attr('number'),
|
allocatedVCores: DS.attr("number"),
|
||||||
memorySeconds: DS.attr('number'),
|
runningContainers: DS.attr("number"),
|
||||||
vcoreSeconds: DS.attr('number'),
|
memorySeconds: DS.attr("number"),
|
||||||
preemptedResourceMB: DS.attr('number'),
|
vcoreSeconds: DS.attr("number"),
|
||||||
preemptedResourceVCores: DS.attr('number'),
|
preemptedResourceMB: DS.attr("number"),
|
||||||
numNonAMContainerPreempted: DS.attr('number'),
|
preemptedResourceVCores: DS.attr("number"),
|
||||||
numAMContainerPreempted: DS.attr('number'),
|
numNonAMContainerPreempted: DS.attr("number"),
|
||||||
clusterUsagePercentage: DS.attr('number'),
|
numAMContainerPreempted: DS.attr("number"),
|
||||||
queueUsagePercentage: DS.attr('number'),
|
clusterUsagePercentage: DS.attr("number"),
|
||||||
currentAppAttemptId: DS.attr('string'),
|
queueUsagePercentage: DS.attr("number"),
|
||||||
remainingTimeoutInSeconds: DS.attr('number'),
|
currentAppAttemptId: DS.attr("string"),
|
||||||
applicationExpiryTime: DS.attr('string'),
|
remainingTimeoutInSeconds: DS.attr("number"),
|
||||||
resourceRequests: DS.attr('array'),
|
applicationExpiryTime: DS.attr("string"),
|
||||||
|
resourceRequests: DS.attr("array"),
|
||||||
|
|
||||||
isFailed: function() {
|
isFailed: function() {
|
||||||
return this.get('finalStatus') === "FAILED";
|
return this.get("finalStatus") === "FAILED";
|
||||||
}.property("finalStatus"),
|
}.property("finalStatus"),
|
||||||
|
|
||||||
validatedFinishedTs: function() {
|
validatedFinishedTs: function() {
|
||||||
@ -70,27 +71,42 @@ export default DS.Model.extend({
|
|||||||
}.property("hasFinishedTime"),
|
}.property("hasFinishedTime"),
|
||||||
|
|
||||||
formattedElapsedTime: function() {
|
formattedElapsedTime: function() {
|
||||||
return Converter.msToElapsedTimeUnit(this.get('elapsedTime'));
|
return Converter.msToElapsedTimeUnit(this.get("elapsedTime"));
|
||||||
}.property('elapsedTime'),
|
}.property("elapsedTime"),
|
||||||
|
|
||||||
allocatedResource: function() {
|
allocatedResource: function() {
|
||||||
return Converter.resourceToString(this.get("allocatedMB"), this.get("allocatedVCores"));
|
return Converter.resourceToString(
|
||||||
|
this.get("allocatedMB"),
|
||||||
|
this.get("allocatedVCores")
|
||||||
|
);
|
||||||
}.property("allocatedMB", "allocatedVCores"),
|
}.property("allocatedMB", "allocatedVCores"),
|
||||||
|
|
||||||
preemptedResource: function() {
|
preemptedResource: function() {
|
||||||
return Converter.resourceToString(this.get("preemptedResourceMB"), this.get("preemptedResourceVCores"));
|
return Converter.resourceToString(
|
||||||
|
this.get("preemptedResourceMB"),
|
||||||
|
this.get("preemptedResourceVCores")
|
||||||
|
);
|
||||||
}.property("preemptedResourceMB", "preemptedResourceVCores"),
|
}.property("preemptedResourceMB", "preemptedResourceVCores"),
|
||||||
|
|
||||||
aggregatedResourceUsage: function() {
|
aggregatedResourceUsage: function() {
|
||||||
return Converter.resourceToString(this.get("memorySeconds"), this.get("vcoreSeconds")) + " (× Secs)";
|
return (
|
||||||
|
Converter.resourceToString(
|
||||||
|
this.get("memorySeconds"),
|
||||||
|
this.get("vcoreSeconds")
|
||||||
|
) + " (× Secs)"
|
||||||
|
);
|
||||||
}.property("memorySeconds", "vcoreSeconds"),
|
}.property("memorySeconds", "vcoreSeconds"),
|
||||||
|
|
||||||
|
masterNodeURL: function() {
|
||||||
|
return `#/yarn-node/${this.get("masterNodeId")}/${this.get("amHostHttpAddress")}/info/`;
|
||||||
|
}.property("masterNodeId", "amHostHttpAddress"),
|
||||||
|
|
||||||
progressStyle: function() {
|
progressStyle: function() {
|
||||||
return "width: " + this.get("progress") + "%";
|
return "width: " + this.get("progress") + "%";
|
||||||
}.property("progress"),
|
}.property("progress"),
|
||||||
|
|
||||||
runningContainersNumber: function() {
|
runningContainersNumber: function() {
|
||||||
if(this.get("runningContainers") < 0) {
|
if (this.get("runningContainers") < 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return this.get("runningContainers");
|
return this.get("runningContainers");
|
||||||
|
@ -51,6 +51,7 @@ export default DS.JSONAPISerializer.extend({
|
|||||||
diagnostics: (payload.diagnostics && payload.diagnostics !== 'null')? payload.diagnostics : '',
|
diagnostics: (payload.diagnostics && payload.diagnostics !== 'null')? payload.diagnostics : '',
|
||||||
amContainerLogs: payload.amContainerLogs,
|
amContainerLogs: payload.amContainerLogs,
|
||||||
amHostHttpAddress: payload.amHostHttpAddress,
|
amHostHttpAddress: payload.amHostHttpAddress,
|
||||||
|
masterNodeId: payload.masterNodeId,
|
||||||
logAggregationStatus: payload.logAggregationStatus,
|
logAggregationStatus: payload.logAggregationStatus,
|
||||||
unmanagedApplication: payload.unmanagedApplication,
|
unmanagedApplication: payload.unmanagedApplication,
|
||||||
amNodeLabelExpression: payload.amNodeLabelExpression,
|
amNodeLabelExpression: payload.amNodeLabelExpression,
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
<div class="flex-right">
|
<div class="flex-right">
|
||||||
<div class="links">
|
<div class="links">
|
||||||
<a href="{{model.app.amContainerLogs}}" target="_blank">Master Container Log</a> |
|
<a href="{{model.app.amContainerLogs}}" target="_blank">Master Container Log</a> |
|
||||||
<a href="{{amHostHttpAddressFormatted}}" target="_blank">Master Node</a> |
|
<a href="{{model.app.masterNodeURL}}">Master Node</a> |
|
||||||
{{#if isRunningService}}
|
{{#if isRunningService}}
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-unstyled dropdown-toggle" title="Settings" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button type="button" class="btn btn-unstyled dropdown-toggle" title="Settings" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
Loading…
Reference in New Issue
Block a user