YARN-5660. Wrong audit constants are used in Get/Put of priority in RMWebService. Contributed by Rohith Sharma K S

(cherry picked from commit ebf528c443)
This commit is contained in:
Naganarasimha 2016-09-27 16:37:34 +05:30
parent 686cbf45d4
commit 63ca9f5441
2 changed files with 11 additions and 8 deletions

View File

@ -50,6 +50,9 @@ public class RMAuditLogger {
public static final String KILL_APP_REQUEST = "Kill Application Request";
public static final String SUBMIT_APP_REQUEST = "Submit Application Request";
public static final String MOVE_APP_REQUEST = "Move Application Request";
public static final String GET_APP_STATE = "Get Application State";
public static final String GET_APP_PRIORITY = "Get Application Priority";
public static final String GET_APP_QUEUE = "Get Application Queue";
public static final String FINISH_SUCCESS_APP = "Application Finished - Succeeded";
public static final String FINISH_FAILED_APP = "Application Finished - Failed";
public static final String FINISH_KILLED_APP = "Application Finished - Killed";

View File

@ -736,7 +736,7 @@ public class RMWebServices {
try {
app = getRMAppForAppId(appId);
} catch (NotFoundException e) {
RMAuditLogger.logFailure(userName, AuditConstants.KILL_APP_REQUEST,
RMAuditLogger.logFailure(userName, AuditConstants.GET_APP_STATE,
"UNKNOWN", "RMWebService",
"Trying to get state of an absent application " + appId);
throw e;
@ -1077,9 +1077,9 @@ public class RMWebServices {
try {
app = getRMAppForAppId(appId);
} catch (NotFoundException e) {
RMAuditLogger.logFailure(userName, AuditConstants.KILL_APP_REQUEST,
RMAuditLogger.logFailure(userName, AuditConstants.GET_APP_PRIORITY,
"UNKNOWN", "RMWebService",
"Trying to get state of an absent application " + appId);
"Trying to get priority of an absent application " + appId);
throw e;
}
@ -1120,9 +1120,9 @@ public class RMWebServices {
try {
app = getRMAppForAppId(appId);
} catch (NotFoundException e) {
RMAuditLogger.logFailure(userName, AuditConstants.KILL_APP_REQUEST,
RMAuditLogger.logFailure(userName, AuditConstants.UPDATE_APP_PRIORITY,
"UNKNOWN", "RMWebService",
"Trying to move an absent application " + appId);
"Trying to update priority an absent application " + appId);
throw e;
}
Priority priority = app.getApplicationSubmissionContext().getPriority();
@ -1191,9 +1191,9 @@ public class RMWebServices {
try {
app = getRMAppForAppId(appId);
} catch (NotFoundException e) {
RMAuditLogger.logFailure(userName, AuditConstants.KILL_APP_REQUEST,
RMAuditLogger.logFailure(userName, AuditConstants.GET_APP_QUEUE,
"UNKNOWN", "RMWebService",
"Trying to get state of an absent application " + appId);
"Trying to get queue of an absent application " + appId);
throw e;
}
@ -1229,7 +1229,7 @@ public class RMWebServices {
try {
app = getRMAppForAppId(appId);
} catch (NotFoundException e) {
RMAuditLogger.logFailure(userName, AuditConstants.KILL_APP_REQUEST,
RMAuditLogger.logFailure(userName, AuditConstants.MOVE_APP_REQUEST,
"UNKNOWN", "RMWebService", "Trying to move an absent application "
+ appId);
throw e;