[jira] [Commented] (RANGER-2551) Optimize obtaining the agentHostname of audit log
[ https://issues.apache.org/jira/browse/RANGER-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16918201#comment-16918201 ] Haihui Xu commented on RANGER-2551: --- ok, Thanks. Got it. [~bosco] > Optimize obtaining the agentHostname of audit log > -- > > Key: RANGER-2551 > URL: https://issues.apache.org/jira/browse/RANGER-2551 > Project: Ranger > Issue Type: Improvement > Components: plugins, Ranger >Affects Versions: 1.1.0, 2.0.0, 1.2.0 >Reporter: Haihui Xu >Assignee: Haihui Xu >Priority: Major > Labels: patch > Fix For: 2.1.0 > > Attachments: RANGER-2551.patch > > > Firstly, kafka enable ranger-kafka-plugin,. The ranger audit log event > happens very frequently when the kafka client access kafka broker, thus > affectting kafka performance. The jstack of kakfa broker pid logs is: > "kafka-request-handler-23" #101 daemon prio=5 os_prio=0 > tid=0x7fbcce7d5000 nid=0x3331a runnable [0x7fb356e3000] > java.lang.Thread.State: RUNNABLE > at java.net.Inet4AddressImpl.getLocalHostName(Native Method) > at java.net.InetAddress.getLocalHost(InetAddress.java:1474) > at > org.apache.ranger.audit.provider.MiscUtil.getHostname(MiscUtil.java 166) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.populateDefaults(RangerDefaultAuditHandler.java:198) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.getAuthezEvents(RangerDefaultAuditHandler.java:132) -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Commented] (RANGER-2551) Optimize obtaining the agentHostname of audit log
[ https://issues.apache.org/jira/browse/RANGER-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16918189#comment-16918189 ] Don Bosco Durai commented on RANGER-2551: - [~Seymour Xu] which Ranger version are you using? The stack trace in the JIRA is not matching the code. In the last MiscUtil.getHostname() we are already taking care of caching the hostname. {code:java} public static String getHostname() { String ret = local_hostname; if (ret == null) { initLocalHost(); ret = local_hostname; if (ret == null) { ret = "unknown"; } } return ret; } {code} > Optimize obtaining the agentHostname of audit log > -- > > Key: RANGER-2551 > URL: https://issues.apache.org/jira/browse/RANGER-2551 > Project: Ranger > Issue Type: Improvement > Components: plugins, Ranger >Affects Versions: 1.1.0, 2.0.0, 1.2.0 >Reporter: Haihui Xu >Assignee: Haihui Xu >Priority: Major > Labels: patch > Fix For: 2.1.0 > > Attachments: RANGER-2551.patch > > > Firstly, kafka enable ranger-kafka-plugin,. The ranger audit log event > happens very frequently when the kafka client access kafka broker, thus > affectting kafka performance. The jstack of kakfa broker pid logs is: > "kafka-request-handler-23" #101 daemon prio=5 os_prio=0 > tid=0x7fbcce7d5000 nid=0x3331a runnable [0x7fb356e3000] > java.lang.Thread.State: RUNNABLE > at java.net.Inet4AddressImpl.getLocalHostName(Native Method) > at java.net.InetAddress.getLocalHost(InetAddress.java:1474) > at > org.apache.ranger.audit.provider.MiscUtil.getHostname(MiscUtil.java 166) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.populateDefaults(RangerDefaultAuditHandler.java:198) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.getAuthezEvents(RangerDefaultAuditHandler.java:132) -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Commented] (RANGER-2551) Optimize obtaining the agentHostname of audit log
[ https://issues.apache.org/jira/browse/RANGER-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16916815#comment-16916815 ] Madhan Neethiraj commented on RANGER-2551: -- bq. Two different matters. you can see the uuid in RangerDefaultAuditHandler.java like: private static String UUID = MiscUtil.generateUniqueId(); [~Seymour Xu] - this JIRA is about caching local ip address in MiscUtil.getHostName(). How is the above reference to MiscUtil.generateUniqueId() related to this? > Optimize obtaining the agentHostname of audit log > -- > > Key: RANGER-2551 > URL: https://issues.apache.org/jira/browse/RANGER-2551 > Project: Ranger > Issue Type: Improvement > Components: plugins, Ranger >Affects Versions: 1.1.0, 2.0.0, 1.2.0 >Reporter: Haihui Xu >Assignee: Haihui Xu >Priority: Major > Labels: patch > Fix For: 2.1.0 > > Attachments: RANGER-2551.patch > > > Firstly, kafka enable ranger-kafka-plugin,. The ranger audit log event > happens very frequently when the kafka client access kafka broker, thus > affectting kafka performance. The jstack of kakfa broker pid logs is: > "kafka-request-handler-23" #101 daemon prio=5 os_prio=0 > tid=0x7fbcce7d5000 nid=0x3331a runnable [0x7fb356e3000] > java.lang.Thread.State: RUNNABLE > at java.net.Inet4AddressImpl.getLocalHostName(Native Method) > at java.net.InetAddress.getLocalHost(InetAddress.java:1474) > at > org.apache.ranger.audit.provider.MiscUtil.getHostname(MiscUtil.java 166) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.populateDefaults(RangerDefaultAuditHandler.java:198) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.getAuthezEvents(RangerDefaultAuditHandler.java:132) -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Commented] (RANGER-2551) Optimize obtaining the agentHostname of audit log
[ https://issues.apache.org/jira/browse/RANGER-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16916259#comment-16916259 ] Haihui Xu commented on RANGER-2551: --- [~madhan.neethiraj] Two different matters. you can see the uuid in RangerDefaultAuditHandler.java like: private static String UUID = MiscUtil.generateUniqueId(); > Optimize obtaining the agentHostname of audit log > -- > > Key: RANGER-2551 > URL: https://issues.apache.org/jira/browse/RANGER-2551 > Project: Ranger > Issue Type: Improvement > Components: plugins, Ranger >Affects Versions: 1.1.0, 2.0.0, 1.2.0 >Reporter: Haihui Xu >Assignee: Haihui Xu >Priority: Major > Labels: patch > Fix For: 2.1.0 > > Attachments: RANGER-2551.patch > > > Firstly, kafka enable ranger-kafka-plugin,. The ranger audit log event > happens very frequently when the kafka client access kafka broker, thus > affectting kafka performance. The jstack of kakfa broker pid logs is: > "kafka-request-handler-23" #101 daemon prio=5 os_prio=0 > tid=0x7fbcce7d5000 nid=0x3331a runnable [0x7fb356e3000] > java.lang.Thread.State: RUNNABLE > at java.net.Inet4AddressImpl.getLocalHostName(Native Method) > at java.net.InetAddress.getLocalHost(InetAddress.java:1474) > at > org.apache.ranger.audit.provider.MiscUtil.getHostname(MiscUtil.java 166) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.populateDefaults(RangerDefaultAuditHandler.java:198) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.getAuthezEvents(RangerDefaultAuditHandler.java:132) -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Commented] (RANGER-2551) Optimize obtaining the agentHostname of audit log
[ https://issues.apache.org/jira/browse/RANGER-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16916258#comment-16916258 ] Haihui Xu commented on RANGER-2551: --- ok, Thanks. See: https://reviews.apache.org/r/71371/ [~bosco] > Optimize obtaining the agentHostname of audit log > -- > > Key: RANGER-2551 > URL: https://issues.apache.org/jira/browse/RANGER-2551 > Project: Ranger > Issue Type: Improvement > Components: plugins, Ranger >Affects Versions: 1.1.0, 2.0.0, 1.2.0 >Reporter: Haihui Xu >Assignee: Haihui Xu >Priority: Major > Labels: patch > Fix For: 2.1.0 > > Attachments: RANGER-2551.patch > > > Firstly, kafka enable ranger-kafka-plugin,. The ranger audit log event > happens very frequently when the kafka client access kafka broker, thus > affectting kafka performance. The jstack of kakfa broker pid logs is: > "kafka-request-handler-23" #101 daemon prio=5 os_prio=0 > tid=0x7fbcce7d5000 nid=0x3331a runnable [0x7fb356e3000] > java.lang.Thread.State: RUNNABLE > at java.net.Inet4AddressImpl.getLocalHostName(Native Method) > at java.net.InetAddress.getLocalHost(InetAddress.java:1474) > at > org.apache.ranger.audit.provider.MiscUtil.getHostname(MiscUtil.java 166) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.populateDefaults(RangerDefaultAuditHandler.java:198) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.getAuthezEvents(RangerDefaultAuditHandler.java:132) -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Commented] (RANGER-2551) Optimize obtaining the agentHostname of audit log
[ https://issues.apache.org/jira/browse/RANGER-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16915827#comment-16915827 ] Madhan Neethiraj commented on RANGER-2551: -- [~Seymour Xu] - ihe stacktrace in the description suggests that the fix in RANGER-809 may not be present in your env; [commitdiff|https://gitbox.apache.org/repos/asf?p=ranger.git;a=commitdiff;h=ffb895e2]. Can you please review? > Optimize obtaining the agentHostname of audit log > -- > > Key: RANGER-2551 > URL: https://issues.apache.org/jira/browse/RANGER-2551 > Project: Ranger > Issue Type: Improvement > Components: plugins, Ranger >Affects Versions: 1.1.0, 2.0.0, 1.2.0 >Reporter: Haihui Xu >Assignee: Haihui Xu >Priority: Major > Labels: patch > Fix For: 2.1.0 > > Attachments: RANGER-2551.patch > > > Firstly, kafka enable ranger-kafka-plugin,. The ranger audit log event > happens very frequently when the kafka client access kafka broker, thus > affectting kafka performance. The jstack of kakfa broker pid logs is: > "kafka-request-handler-23" #101 daemon prio=5 os_prio=0 > tid=0x7fbcce7d5000 nid=0x3331a runnable [0x7fb356e3000] > java.lang.Thread.State: RUNNABLE > at java.net.Inet4AddressImpl.getLocalHostName(Native Method) > at java.net.InetAddress.getLocalHost(InetAddress.java:1474) > at > org.apache.ranger.audit.provider.MiscUtil.getHostname(MiscUtil.java 166) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.populateDefaults(RangerDefaultAuditHandler.java:198) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.getAuthezEvents(RangerDefaultAuditHandler.java:132) -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Commented] (RANGER-2551) Optimize obtaining the agentHostname of audit log
[ https://issues.apache.org/jira/browse/RANGER-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16915597#comment-16915597 ] Don Bosco Durai commented on RANGER-2551: - [~Seymour Xu], the patch looks good. Can you create a Review Board review? Thanks > Optimize obtaining the agentHostname of audit log > -- > > Key: RANGER-2551 > URL: https://issues.apache.org/jira/browse/RANGER-2551 > Project: Ranger > Issue Type: Improvement > Components: plugins, Ranger >Affects Versions: 1.1.0, 2.0.0, 1.2.0 >Reporter: Haihui Xu >Assignee: Haihui Xu >Priority: Major > Labels: patch > Fix For: 2.1.0 > > Attachments: RANGER-2551.patch > > > Firstly, kafka enable ranger-kafka-plugin,. The ranger audit log event > happens very frequently when the kafka client access kafka broker, thus > affectting kafka performance. The jstack of kakfa broker pid logs is: > "kafka-request-handler-23" #101 daemon prio=5 os_prio=0 > tid=0x7fbcce7d5000 nid=0x3331a runnable [0x7fb356e3000] > java.lang.Thread.State: RUNNABLE > at java.net.Inet4AddressImpl.getLocalHostName(Native Method) > at java.net.InetAddress.getLocalHost(InetAddress.java:1474) > at > org.apache.ranger.audit.provider.MiscUtil.getHostname(MiscUtil.java 166) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.populateDefaults(RangerDefaultAuditHandler.java:198) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.getAuthezEvents(RangerDefaultAuditHandler.java:132) -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Commented] (RANGER-2551) Optimize obtaining the agentHostname of audit log
[ https://issues.apache.org/jira/browse/RANGER-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16915596#comment-16915596 ] Haihui Xu commented on RANGER-2551: --- The ranger audit log event happens very frequently when the kafka client access kafka broker, and finally call native method very frequently. > Optimize obtaining the agentHostname of audit log > -- > > Key: RANGER-2551 > URL: https://issues.apache.org/jira/browse/RANGER-2551 > Project: Ranger > Issue Type: Improvement > Components: plugins, Ranger >Affects Versions: 1.1.0, 2.0.0, 1.2.0 >Reporter: Haihui Xu >Assignee: Haihui Xu >Priority: Major > Labels: patch > Fix For: 2.1.0 > > Attachments: RANGER-2551.patch > > > Firstly, kafka enable ranger-kafka-plugin,. The ranger audit log event > happens very frequently when the kafka client access kafka broker, thus > affectting kafka performance. The jstack of kakfa broker pid logs is: > "kafka-request-handler-23" #101 daemon prio=5 os_prio=0 > tid=0x7fbcce7d5000 nid=0x3331a runnable [0x7fb356e3000] > java.lang.Thread.State: RUNNABLE > at java.net.Inet4AddressImpl.getLocalHostName(Native Method) > at java.net.InetAddress.getLocalHost(InetAddress.java:1474) > at > org.apache.ranger.audit.provider.MiscUtil.getHostname(MiscUtil.java 166) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.populateDefaults(RangerDefaultAuditHandler.java:198) > at > org.apache.ranger.plugin.audit.RangerDefaultAuditHandler.getAuthezEvents(RangerDefaultAuditHandler.java:132) -- This message was sent by Atlassian Jira (v8.3.2#803003)