Ashwani Raina has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24167
Change subject: [ranger] fix ranger audit log write to hdfs ...................................................................... [ranger] fix ranger audit log write to hdfs The patch enables kudu ranger to write audit logs to HDFS destination. The existing jira (KUDU-3359) only enables ranger to accept multiple JAR files as input paramter to --ranger_jar_path flag. However, this doesn't seem to be completely enabling the audit logging to HDFS. It has been observed that without this patch, following error is hit while ranger attempts to write audit logs to HDFS location: [1] "UnsupportedFileSystemException: No FileSystem for scheme "hdfs"." The error is caused because no implementation for hdfs:// scheme is found in the path due to absence of hadoop-hdfs-client inside the JAR. Main highlights: - Register hadoop-hdfs-client as a named library alias so that build gradle can reference it. - Adds hadoop-hdfs-client.jar as a compile-time dependency of the kudu-subprocess module so it gets bundled into kudu-subprocess.jar. This fixes [1] error and uses exclude directive to avoid conflicting versions of netty, log4j and slf4j. - Adding of hadoop-hdfs-client (along with its transitive dependencies) pushed the total number of entries in kudu-subprocess.jar past 64K limit, thereby causing a build failure. Enable 'zip64' extension. - Appends <ranger_config_path>/hadoop-conf to the JVM classpath used when launching the Ranger subprocess. It is to ensure HDFS client has all the properties (e.g. HDFS client needs one of the properties i.e., 'dfs.namenode.kerberos.principal' to authenticate with the NameNode via Kerberos and the property resides in hdfs-site.xml). Java silently ignores classpath entries pointing to directories that do not exist, so mini-cluster tests and local development builds are completely unaffected. Change-Id: Ia788890ef55b44ba91c54e55a103d6aa6d306b25 --- M java/gradle/dependencies.gradle M java/gradle/shadow.gradle M java/kudu-subprocess/build.gradle M src/kudu/ranger/ranger_client.cc 4 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/67/24167/1 -- To view, visit http://gerrit.cloudera.org:8080/24167 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ia788890ef55b44ba91c54e55a103d6aa6d306b25 Gerrit-Change-Number: 24167 Gerrit-PatchSet: 1 Gerrit-Owner: Ashwani Raina <[email protected]>
