YARN-821. Renamed setFinishApplicationStatus to setFinalApplicationStatus in FinishApplicationMasterRequest for consistency. Contributed by Jian He.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1493315 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2013-06-15 04:57:04 +00:00
parent 5694c34040
commit c2d0cf1b20
8 changed files with 16 additions and 13 deletions

View File

@ -188,7 +188,7 @@ protected void unregister() {
FinishApplicationMasterRequest request =
recordFactory.newRecordInstance(FinishApplicationMasterRequest.class);
request.setAppAttemptId(this.applicationAttemptId);
request.setFinishApplicationStatus(finishState);
request.setFinalApplicationStatus(finishState);
request.setDiagnostics(sb.toString());
request.setTrackingUrl(historyUrl);
scheduler.finishApplicationMaster(request);

View File

@ -146,6 +146,9 @@ Release 2.1.0-beta - UNRELEASED
YARN-806. Moved ContainerExitStatus from yarn.api to yarn.api.records. (Jian
He via vinodkv)
YARN-821. Renamed setFinishApplicationStatus to setFinalApplicationStatus in
FinishApplicationMasterRequest for consistency. (Jian He via vinodk)
NEW FEATURES
YARN-482. FS: Extend SchedulingMode to intermediate queues.

View File

@ -54,7 +54,7 @@ public static FinishApplicationMasterRequest newInstance(
FinishApplicationMasterRequest request =
Records.newRecord(FinishApplicationMasterRequest.class);
request.setAppAttemptId(appAttemptId);
request.setFinishApplicationStatus(finalAppStatus);
request.setFinalApplicationStatus(finalAppStatus);
request.setDiagnostics(diagnostics);
request.setTrackingUrl(url);
return request;
@ -89,12 +89,12 @@ public static FinishApplicationMasterRequest newInstance(
public abstract FinalApplicationStatus getFinalApplicationStatus();
/**
* Set the <em>finish state</em> of the <code>ApplicationMaster</code>
* @param finishState <em>finish state</em> of the <code>ApplicationMaster</code>
* Set the <em>final state</em> of the <code>ApplicationMaster</code>
* @param finalState <em>final state</em> of the <code>ApplicationMaster</code>
*/
@Public
@Stable
public abstract void setFinishApplicationStatus(FinalApplicationStatus finishState);
public abstract void setFinalApplicationStatus(FinalApplicationStatus finalState);
/**
* Get <em>diagnostic information</em> on application failure.

View File

@ -150,13 +150,13 @@ public FinalApplicationStatus getFinalApplicationStatus() {
}
@Override
public void setFinishApplicationStatus(FinalApplicationStatus finishState) {
public void setFinalApplicationStatus(FinalApplicationStatus finalState) {
maybeInitBuilder();
if (finishState == null) {
if (finalState == null) {
builder.clearFinalApplicationStatus();
return;
}
builder.setFinalApplicationStatus(convertToProtoFormat(finishState));
builder.setFinalApplicationStatus(convertToProtoFormat(finalState));
}
private ApplicationAttemptIdPBImpl convertFromProtoFormat(ApplicationAttemptIdProto p) {

View File

@ -272,7 +272,7 @@ public void unregisterApplicationMaster(FinalApplicationStatus appStatus,
FinishApplicationMasterRequest request = recordFactory
.newRecordInstance(FinishApplicationMasterRequest.class);
request.setAppAttemptId(appAttemptId);
request.setFinishApplicationStatus(appStatus);
request.setFinalApplicationStatus(appStatus);
if(appMessage != null) {
request.setDiagnostics(appMessage);
}

View File

@ -168,9 +168,9 @@ public interface RMApp extends EventHandler<RMAppEvent> {
/**
* The final finish state of the AM when unregistering as in
* {@link FinishApplicationMasterRequest#setFinishApplicationStatus(FinalApplicationStatus)}.
* {@link FinishApplicationMasterRequest#setFinalApplicationStatus(FinalApplicationStatus)}.
* @return the final finish state of the AM as set in
* {@link FinishApplicationMasterRequest#setFinishApplicationStatus(FinalApplicationStatus)}.
* {@link FinishApplicationMasterRequest#setFinalApplicationStatus(FinalApplicationStatus)}.
*/
FinalApplicationStatus getFinalApplicationStatus();

View File

@ -153,7 +153,7 @@ public void unregisterAppAttempt() throws Exception {
FinishApplicationMasterRequest req = Records.newRecord(FinishApplicationMasterRequest.class);
req.setAppAttemptId(attemptId);
req.setDiagnostics("");
req.setFinishApplicationStatus(FinalApplicationStatus.SUCCEEDED);
req.setFinalApplicationStatus(FinalApplicationStatus.SUCCEEDED);
req.setTrackingUrl("");
amRMProtocol.finishApplicationMaster(req);
}

View File

@ -116,7 +116,7 @@ public void testTokenExpiry() throws Exception {
Records.newRecord(FinishApplicationMasterRequest.class);
finishAMRequest.setAppAttemptId(applicationAttemptId);
finishAMRequest
.setFinishApplicationStatus(FinalApplicationStatus.SUCCEEDED);
.setFinalApplicationStatus(FinalApplicationStatus.SUCCEEDED);
finishAMRequest.setDiagnostics("diagnostics");
finishAMRequest.setTrackingUrl("url");
rmClient.finishApplicationMaster(finishAMRequest);