sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [5/5] sentry git commit: Switching remove role (rm) to drop role (dr) for consistency with the shell scripts
Date Thu, 19 Oct 2017 11:20:43 GMT
Switching remove role (rm) to drop role (dr) for consistency with the shell scripts


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

Branch: refs/heads/akolb-cli
Commit: 922b3169615a0e42f6469135d6f95bcec17f01b7
Parents: c649777
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Oct 19 12:15:44 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Oct 19 12:15:44 2017 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/sentry/shell/RolesShell.java    | 6 +++---
 .../src/main/java/org/apache/sentry/shell/ShellUtil.java     | 4 ++--
 .../src/main/java/org/apache/sentry/shell/TopLevelShell.java | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/922b3169/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java b/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java
index 856f422..ab4589d 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java
@@ -56,11 +56,11 @@ public class RolesShell implements ShellDependent {
         tools.createRoles(roles);
     }
 
-    @Command(description = "remove Sentry role(s).")
-    public void remove(
+    @Command(description = "drop Sentry role(s).")
+    public void drop(
             @Param(name = "roleName ...", description = "role names to remove")
             String ...roles) {
-        tools.removeRoles(roles);
+        tools.dropRoles(roles);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/sentry/blob/922b3169/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java b/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java
index 5df21ae..4904fac 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java
@@ -82,12 +82,12 @@ class ShellUtil {
         }
     }
 
-    void removeRoles(String ...roles) {
+    void dropRoles(String ...roles) {
         for (String role: roles) {
             try {
                 sentryClient.dropRole(authUser, role);
             } catch (SentryUserException e) {
-                System.out.printf("failed to remove role %s: %s\n",
+                System.out.printf("failed to drop role %s: %s\n",
                         role, e.toString());
             }
         }

http://git-wip-us.apache.org/repos/asf/sentry/blob/922b3169/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java b/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
index ef5313a..738a992 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
@@ -108,11 +108,11 @@ public class TopLevelShell implements ShellDependent, Runnable {
         tools.createRoles(roles);
     }
 
-    @Command(abbrev = "rm", description = "remove Sentry role(s).")
-    public void removeRole(
-            @Param(name = "roleName ...", description = "role names to remove")
+    @Command(abbrev = "dr", description = "drop Sentry role(s).")
+    public void dropRole(
+            @Param(name = "roleName ...", description = "role names to drop")
                     String ...roles) {
-        tools.removeRoles(roles);
+        tools.dropRoles(roles);
     }
 
     @Command(description = "list Sentry privileges")


Mime
View raw message