adoroszlai opened a new pull request #277: HDDS-2628. Make AuditMessage 
parameters strongly typed
URL: https://github.com/apache/hadoop-ozone/pull/277
 
 
   ## What changes were proposed in this pull request?
   
   1. Improve type safety in `AuditMessage$Builder` for methods `forOperation` 
and `withResult` by using existing `interface AuditAction` and `enum 
AuditEventStatus` respectively instead of Strings.
   2. Use existing `Server.getRemoteAddress()` instead of 
`Server.getRemoteIp().getHostAddress()` with null check
   3. Define and use `getRemoteUserName()` along the same lines
   
   https://issues.apache.org/jira/browse/HDDS-2628
   
   ## How was this patch tested?
   
   Created keys using Freon, verified audit log entries.
   
   ```
   2019-11-27 20:48:16,206 | INFO  | SCMAudit | user=hadoop | ip=172.23.0.3 | 
op=ALLOCATE_BLOCK {owner=88982149-2c09-4cd7-8e38-fba8f23cff5e, size=268435456, 
type=RATIS, factor=ONE} | ret=SUCCESS |
   2019-11-27 20:48:45,879 | INFO  | SCMAudit | user=hadoop | ip=172.23.0.4 | 
op=SEND_HEARTBEAT {datanodeUUID=4e2ee488-6dc6-45f8-9f02-02f1a5cff554, 
command=[]} | ret=SUCCESS |
   ```
   
   ```
   2019-11-27 20:48:16,208 | INFO  | OMAudit | user=hadoop | ip=172.23.0.2 | 
op=ALLOCATE_KEY {volume=vol1, bucket=bucket1, key=OkoBsDwxuj/9, dataSize=10240, 
replicationType=RATIS, replicationFactor=ONE, keyLocationInfo=[blockID {
     containerBlockID {
       containerID: 1
       localID: 103211840058556425
       ...
   ```
   
   https://github.com/adoroszlai/hadoop-ozone/runs/323724573

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to