[ https://issues.apache.org/jira/browse/HDDS-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16712294#comment-16712294 ]
Yiqun Lin edited comment on HDDS-99 at 12/7/18 3:29 AM: -------------------------------------------------------- Thanks [~dineshchitlangia] for working on this! Almost looks good to me, some minor comments from me: * Audit action {{IN_CHILL_MODE}} is not used actually, looks like it was duplicate to {{IS_CHILL_MODE}}. * Can we define a new function to construct the audit map with given parameters? As I see we did the duplicate logic in every where. New function can be like: {noformat} private Map<String, String> constructAuditMap(String... params) { Map<String, String> auditMap = Maps.newHashMap(); for(int i = 0; i < params.length ; i+=2) { auditMap.put(params[i], params[i+1]); } return auditMap; } {noformat} For example, using this, listContainer's audit map will be simplified as {{auditMap = constructAuditMap("startContainerID", String.valueOf(startContainerID), "count", String.valueOf(count))}} was (Author: linyiqun): Thanks [~dineshchitlangia] for working on this! Almost looks good to me, some minor comments from me: * Audit action {{IN_CHILL_MODE}} is not used actually, looks like it was duplicate to {{IS_CHILL_MODE}}. * Can we define a new function to construct the audit map with given parameters? As I see we did the duplicate logic in every where. New function can be like: {noformat} private Map<String, String> constructAuditMap(String... params) { Map<String, String> auditMap = Maps.newHashMap(); for(int i = 0; i < params.length ; i+=2) { auditMap.put(params[i], params[i+1]); } return auditMap; } {noformat} Using this, listContainer's audit map will be simplified as {{auditMap = constructAuditMap("startContainerID", String.valueOf(startContainerID), "count", String.valueOf(count))}} > Adding SCM Audit log > -------------------- > > Key: HDDS-99 > URL: https://issues.apache.org/jira/browse/HDDS-99 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Components: SCM > Reporter: Xiaoyu Yao > Assignee: Dinesh Chitlangia > Priority: Major > Labels: alpha2 > Attachments: HDDS-99.001.patch > > > This ticket is opened to add SCM audit log. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org