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

svn merge --ignore-ancestry -c 1493315 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1493316 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2013-06-15 04:58:45 +00:00
parent 2d8999dc35
commit dc8d2412fe
8 changed files with 16 additions and 13 deletions

View File

@ -188,7 +188,7 @@ public abstract class RMCommunicator extends AbstractService
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

@ -126,6 +126,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 abstract class FinishApplicationMasterRequest {
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 abstract class FinishApplicationMasterRequest {
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 class FinishApplicationMasterRequestPBImpl extends FinishApplicationMaste
}
@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 class AMRMClientImpl<T extends ContainerRequest>
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 class MockAM {
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 class TestApplicationTokens {
Records.newRecord(FinishApplicationMasterRequest.class);
finishAMRequest.setAppAttemptId(applicationAttemptId);
finishAMRequest
.setFinishApplicationStatus(FinalApplicationStatus.SUCCEEDED);
.setFinalApplicationStatus(FinalApplicationStatus.SUCCEEDED);
finishAMRequest.setDiagnostics("diagnostics");
finishAMRequest.setTrackingUrl("url");
rmClient.finishApplicationMaster(finishAMRequest);