sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [2/2] sentry git commit: SENTRY-1253: SentryShellKafka is incorrectly setting component as "KAFKA" (Ashish K Singh, reviewed by Sravya Tirukkovalur and Dapeng Sun)
Date Fri, 13 May 2016 03:16:32 GMT
SENTRY-1253: SentryShellKafka is incorrectly setting component as "KAFKA"  (Ashish K Singh,
reviewed by Sravya Tirukkovalur and Dapeng Sun)


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

Branch: refs/heads/master
Commit: 1cbf44ade98a96985ec260c623ff6fd9122ad953
Parents: afb6d9a
Author: Ashish K Singh <asingh@cloudera.com>
Authored: Fri May 13 11:10:55 2016 +0800
Committer: Sun Dapeng <sdp@apache.org>
Committed: Fri May 13 11:12:37 2016 +0800

----------------------------------------------------------------------
 .../apache/sentry/provider/db/generic/tools/SentryShellKafka.java | 3 ++-
 .../sentry/provider/db/generic/tools/TestSentryShellKafka.java    | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/1cbf44ad/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryShellKafka.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryShellKafka.java
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryShellKafka.java
index e15d8d2..0e40882 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryShellKafka.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryShellKafka.java
@@ -22,6 +22,7 @@ import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.sentry.provider.common.AuthorizationComponent;
 import org.apache.sentry.provider.db.generic.service.thrift.SentryGenericServiceClient;
 import org.apache.sentry.provider.db.generic.service.thrift.SentryGenericServiceClientFactory;
 import org.apache.sentry.provider.db.generic.tools.command.*;
@@ -43,7 +44,7 @@ public class SentryShellKafka extends SentryShellCommon {
   @Override
   public void run() throws Exception {
     Command command = null;
-    String component = "KAFKA";
+    String component = AuthorizationComponent.KAFKA;
     Configuration conf = getSentryConf();
 
     String service = conf.get(KAFKA_SERVICE_NAME, "kafka1");

http://git-wip-us.apache.org/repos/asf/sentry/blob/1cbf44ad/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java
b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java
index 52112d1..a38d58b 100644
--- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java
+++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java
@@ -48,7 +48,7 @@ public class TestSentryShellKafka extends SentryGenericServiceIntegrationBase
{
   private File confPath;
   private static String TEST_ROLE_NAME_1 = "testRole1";
   private static String TEST_ROLE_NAME_2 = "testRole2";
-  private static String KAFKA = "KAFKA";
+  private static String KAFKA = "kafka";
   private String requestorName = "";
   private String service = "kafka1";
 


Mime
View raw message