ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ank...@apache.org
Subject ranger git commit: RANGER-1562 : HDFS test connection is failing due to null pointer exception
Date Wed, 10 May 2017 05:57:31 GMT
Repository: ranger
Updated Branches:
  refs/heads/ranger-0.7 db075f111 -> 9aad8d6e7


RANGER-1562 : HDFS test connection is failing due to null pointer exception


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/9aad8d6e
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/9aad8d6e
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/9aad8d6e

Branch: refs/heads/ranger-0.7
Commit: 9aad8d6e7649fe40909a74af8865fff3e28e3ebc
Parents: db075f1
Author: Ankita Sinha <ankita@apache.org>
Authored: Tue May 9 11:08:53 2017 +0530
Committer: Ankita Sinha <ankita@apache.org>
Committed: Wed May 10 11:26:55 2017 +0530

----------------------------------------------------------------------
 .../java/org/apache/ranger/plugin/client/HadoopConfigHolder.java | 4 ++--
 .../java/org/apache/ranger/services/hdfs/RangerServiceHdfs.java  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/9aad8d6e/agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java
----------------------------------------------------------------------
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java
b/agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java
index 8430d35..96645b9 100644
--- a/agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java
@@ -291,7 +291,7 @@ public class HadoopConfigHolder  {
 		if (prop != null) {
 			userName = prop.getProperty(RANGER_LOGIN_USER_NAME_PROP);
 			keyTabFile = prop.getProperty(RANGER_LOGIN_KEYTAB_FILE_PROP);
-			if (!StringUtils.isEmpty(prop.getProperty(ENABLE_HIVE_METASTORE_LOOKUP))) {
+			if (StringUtils.trimToNull(prop.getProperty(ENABLE_HIVE_METASTORE_LOOKUP)) != null) {
 				try {
 					enableHiveMetastoreLookup = Boolean.valueOf(prop.getProperty(ENABLE_HIVE_METASTORE_LOOKUP,"false").trim());
 				} catch (Exception e) {
@@ -299,7 +299,7 @@ public class HadoopConfigHolder  {
 					LOG.error("Error while getting " + ENABLE_HIVE_METASTORE_LOOKUP + " : " + e.getMessage());
 				}
 			}
-			if (!StringUtils.isEmpty(prop.getProperty(HIVE_SITE_FILE_PATH))) {
+			if (StringUtils.trimToNull(prop.getProperty(HIVE_SITE_FILE_PATH)) != null) {
 				hiveSiteFilePath = prop.getProperty(HIVE_SITE_FILE_PATH).trim();
 			} else {
 				hiveSiteFilePath = null;

http://git-wip-us.apache.org/repos/asf/ranger/blob/9aad8d6e/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/RangerServiceHdfs.java
----------------------------------------------------------------------
diff --git a/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/RangerServiceHdfs.java
b/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/RangerServiceHdfs.java
index 2647bad..47b0fcf 100644
--- a/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/RangerServiceHdfs.java
+++ b/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/RangerServiceHdfs.java
@@ -41,7 +41,7 @@ import org.apache.commons.logging.LogFactory;
 public class RangerServiceHdfs extends RangerBaseService {
 
 	private static final Log LOG = LogFactory.getLog(RangerServiceHdfs.class);
-        private static final String AUDITTOHDFS_KMS_PATH = "/ranger/kms/audit";
+        private static final String AUDITTOHDFS_KMS_PATH = "/ranger/audit/kms";
         private static final String AUDITTOHDFS_POLICY_NAME = "kms-audit-path";
 	
 	public RangerServiceHdfs() {


Mime
View raw message