HDFS-10793. Fix HdfsAuditLogger binary incompatibility introduced by HDFS-9184. Contributed by Manoj Govindassamy.
This commit is contained in:
parent
407b519fb1
commit
a445b82baa
@ -7010,6 +7010,16 @@ public void logAuditEvent(boolean succeeded, String userName,
|
|||||||
logAuditMessage(sb.toString());
|
logAuditMessage(sb.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void logAuditEvent(boolean succeeded, String userName,
|
||||||
|
InetAddress addr, String cmd, String src, String dst,
|
||||||
|
FileStatus status, UserGroupInformation ugi,
|
||||||
|
DelegationTokenSecretManager dtSecretManager) {
|
||||||
|
this.logAuditEvent(succeeded, userName, addr, cmd, src, dst, status,
|
||||||
|
null /*CallerContext*/, ugi, dtSecretManager);
|
||||||
|
}
|
||||||
|
|
||||||
public void logAuditMessage(String message) {
|
public void logAuditMessage(String message) {
|
||||||
auditLog.info(message);
|
auditLog.info(message);
|
||||||
}
|
}
|
||||||
|
@ -43,9 +43,9 @@ public void logAuditEvent(boolean succeeded, String userName,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as
|
* Same as
|
||||||
* {@link #logAuditEvent(boolean, String, InetAddress, String, String, String, FileStatus)}
|
* {@link #logAuditEvent(boolean, String, InetAddress, String, String, String,
|
||||||
* with additional parameters related to logging delegation token tracking
|
* FileStatus)} with additional parameters related to logging delegation token
|
||||||
* IDs.
|
* tracking IDs.
|
||||||
*
|
*
|
||||||
* @param succeeded Whether authorization succeeded.
|
* @param succeeded Whether authorization succeeded.
|
||||||
* @param userName Name of the user executing the request.
|
* @param userName Name of the user executing the request.
|
||||||
@ -55,13 +55,28 @@ public void logAuditEvent(boolean succeeded, String userName,
|
|||||||
* @param dst Path of affected destination file (if any).
|
* @param dst Path of affected destination file (if any).
|
||||||
* @param stat File information for operations that change the file's metadata
|
* @param stat File information for operations that change the file's metadata
|
||||||
* (permissions, owner, times, etc).
|
* (permissions, owner, times, etc).
|
||||||
|
* @param callerContext Context information of the caller
|
||||||
* @param ugi UserGroupInformation of the current user, or null if not logging
|
* @param ugi UserGroupInformation of the current user, or null if not logging
|
||||||
* token tracking information
|
* token tracking information
|
||||||
* @param dtSecretManager The token secret manager, or null if not logging
|
* @param dtSecretManager The token secret manager, or null if not logging
|
||||||
* token tracking information
|
* token tracking information
|
||||||
*/
|
*/
|
||||||
public abstract void logAuditEvent(boolean succeeded, String userName,
|
public void logAuditEvent(boolean succeeded, String userName,
|
||||||
InetAddress addr, String cmd, String src, String dst,
|
InetAddress addr, String cmd, String src, String dst,
|
||||||
FileStatus stat, CallerContext callerContext, UserGroupInformation ugi,
|
FileStatus stat, CallerContext callerContext, UserGroupInformation ugi,
|
||||||
|
DelegationTokenSecretManager dtSecretManager) {
|
||||||
|
logAuditEvent(succeeded, userName, addr, cmd, src, dst, stat,
|
||||||
|
ugi, dtSecretManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Same as
|
||||||
|
* {@link #logAuditEvent(boolean, String, InetAddress, String, String,
|
||||||
|
* String, FileStatus, CallerContext, UserGroupInformation,
|
||||||
|
* DelegationTokenSecretManager)} without {@link CallerContext} information.
|
||||||
|
*/
|
||||||
|
public abstract void logAuditEvent(boolean succeeded, String userName,
|
||||||
|
InetAddress addr, String cmd, String src, String dst,
|
||||||
|
FileStatus stat, UserGroupInformation ugi,
|
||||||
DelegationTokenSecretManager dtSecretManager);
|
DelegationTokenSecretManager dtSecretManager);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user