sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ak...@apache.org
Subject [13/13] sentry git commit: Merged with latest sentry-ha-redesign
Date Thu, 11 May 2017 06:45:18 GMT
Merged with latest sentry-ha-redesign


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

Branch: refs/heads/akolb-ha-cli
Commit: 00747e94f7b3345c5bca35a5158e27aa7eaa5373
Parents: 12f2ed5
Author: Alexander Kolbasov <akolb@cloudera.com>
Authored: Wed May 10 23:44:46 2017 -0700
Committer: Alexander Kolbasov <akolb@cloudera.com>
Committed: Wed May 10 23:44:46 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/sentry/shell/GroupShell.java       | 4 ++++
 .../src/main/java/org/apache/sentry/shell/PrivsShell.java       | 5 +++++
 .../src/main/java/org/apache/sentry/shell/SentryCli.java        | 4 +---
 3 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/00747e94/sentry-tools/src/main/java/org/apache/sentry/shell/GroupShell.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/GroupShell.java b/sentry-tools/src/main/java/org/apache/sentry/shell/GroupShell.java
index a69557b..0375bc0 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/GroupShell.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/GroupShell.java
@@ -58,6 +58,10 @@ public class GroupShell implements ShellDependent {
     private final ShellUtil tools;
     private Shell shell;
 
+    public Shell getShell() {
+      return shell;
+    }
+
 
     GroupShell(SentryPolicyServiceClient sentryClient, String authUser) {
         this.tools = new ShellUtil(sentryClient, authUser);

http://git-wip-us.apache.org/repos/asf/sentry/blob/00747e94/sentry-tools/src/main/java/org/apache/sentry/shell/PrivsShell.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/PrivsShell.java b/sentry-tools/src/main/java/org/apache/sentry/shell/PrivsShell.java
index 9b6bf9b..4e6e9f0 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/PrivsShell.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/PrivsShell.java
@@ -30,10 +30,15 @@ public class PrivsShell implements ShellDependent {
     private final ShellUtil tools;
     private Shell shell;
 
+    public Shell getShell() {
+        return shell;
+    }
+
     @Command(description = "Grant privilege to role")
     public void grant(
             @Param(name = "roleName")
             String roleName,
+
             @Param(name = "privilege",
                     description = "privilege string, e.g. server=s1->db=foo")
             String privilege) {

http://git-wip-us.apache.org/repos/asf/sentry/blob/00747e94/sentry-tools/src/main/java/org/apache/sentry/shell/SentryCli.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/SentryCli.java b/sentry-tools/src/main/java/org/apache/sentry/shell/SentryCli.java
index ea5415d..a16f6ee 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/SentryCli.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/SentryCli.java
@@ -41,7 +41,6 @@ import static org.apache.sentry.service.thrift.ServiceConstants.ServerConfig.SEC
  */
 public class SentryCli {
     private static final String LOG4J_CONF = "log4jConf";
-    private final String[] args;
     private Options options = new Options();
     private CommandLine cmd;
 
@@ -83,7 +82,6 @@ public class SentryCli {
      * @param args command-line arguments
      */
     private SentryCli(String[] args) {
-        this.args = args;
         options.addOption("h", "help", false, "show help");
         // file path of sentry-site
         options.addOption("U", userOpt, true, "auth user");
@@ -93,7 +91,7 @@ public class SentryCli {
         CommandLineParser parser = new GnuParser();
         try {
             this.cmd = parser.parse(options, args);
-        } catch (ParseException e) {
+        } catch (ParseException ignored) {
             help();
         }
         if (cmd.hasOption("h")) {


Mime
View raw message