sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject sentry git commit: SENTRY-1727: HMSPathsDumper.cloneToEntry should set authzObjToEntries properly (Lei Xu, Reviewed by: Hao Hao)
Date Thu, 27 Apr 2017 20:30:38 GMT
Repository: sentry
Updated Branches:
  refs/heads/sentry-ha-redesign bfb0456fc -> 2199b74fb


SENTRY-1727: HMSPathsDumper.cloneToEntry should set authzObjToEntries properly (Lei Xu, Reviewed
by: Hao Hao)

Change-Id: Ic73bcacca592b958c0023a69da5d2907ffb1184b


Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/2199b74f
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/2199b74f
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/2199b74f

Branch: refs/heads/sentry-ha-redesign
Commit: 2199b74fb8af4715941c87893518c8288365f4ae
Parents: bfb0456
Author: hahao <hao.hao@cloudera.com>
Authored: Thu Apr 27 13:29:11 2017 -0700
Committer: hahao <hao.hao@cloudera.com>
Committed: Thu Apr 27 13:29:11 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/sentry/hdfs/HMSPathsDumper.java      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/2199b74f/sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/HMSPathsDumper.java
----------------------------------------------------------------------
diff --git a/sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/HMSPathsDumper.java
b/sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/HMSPathsDumper.java
index 7e56952..4e736ea 100644
--- a/sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/HMSPathsDumper.java
+++ b/sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/HMSPathsDumper.java
@@ -120,7 +120,8 @@ public class HMSPathsDumper implements AuthzPathsDumper<HMSPaths>
{
         for (String authzObj: child.getAuthzObjs()) {
           Set<Entry> paths = authzObjToPath.get(authzObj);
           if (paths == null) {
-            paths = new HashSet<Entry>();
+            paths = new HashSet<>();
+            authzObjToPath.put(authzObj, paths);
           }
           paths.add(child);
         }


Mime
View raw message