sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject sqoop git commit: SQOOP-2148: Sqoop2: Fix wrong input sequence of name and type in function new Principal and Resource
Date Tue, 03 Mar 2015 02:03:57 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 9541d4f32 -> a375d462d


SQOOP-2148: Sqoop2: Fix wrong input sequence of name and type in function new Principal and
Resource

(Richard Zhou via Abraham Elmahrek)


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

Branch: refs/heads/sqoop2
Commit: a375d462df4afaaeee280cc7af5ab805bd95aaec
Parents: 9541d4f
Author: Abraham Elmahrek <abe@apache.org>
Authored: Mon Mar 2 17:49:40 2015 -0800
Committer: Abraham Elmahrek <abe@apache.org>
Committed: Mon Mar 2 17:49:40 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java | 4 ++--
 .../src/main/java/org/apache/sqoop/shell/GrantRoleFunction.java  | 2 +-
 .../java/org/apache/sqoop/shell/RevokePrivilegeFunction.java     | 4 ++--
 .../src/main/java/org/apache/sqoop/shell/RevokeRoleFunction.java | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/a375d462/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java b/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java
index d16e097..ccf8988 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/GrantPrivilegeFunction.java
@@ -91,9 +91,9 @@ public class GrantPrivilegeFunction extends SqoopFunction {
   private Status grantPrivilege(String action, String resourceType, String resource,
                                 String principalType, String principal, boolean withGrant)
     throws IOException {
-    MResource resourceObject = new MResource(resourceType, resource);
+    MResource resourceObject = new MResource(resource, resourceType);
     MPrivilege privilegeObject = new MPrivilege(resourceObject, action, withGrant);
-    MPrincipal principalObject = new MPrincipal(principalType, principal);
+    MPrincipal principalObject = new MPrincipal(principal, principalType);
 
     client.grantPrivilege(
       Arrays.asList(principalObject),

http://git-wip-us.apache.org/repos/asf/sqoop/blob/a375d462/shell/src/main/java/org/apache/sqoop/shell/GrantRoleFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/GrantRoleFunction.java b/shell/src/main/java/org/apache/sqoop/shell/GrantRoleFunction.java
index 9dfe90f..d1ae75e 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/GrantRoleFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/GrantRoleFunction.java
@@ -69,7 +69,7 @@ public class GrantRoleFunction extends SqoopFunction {
 
   private Status grantRole(String role, String principalType, String principal) throws IOException
{
     MRole roleObject = new MRole(role);
-    MPrincipal principalObject = new MPrincipal(principalType, principal);
+    MPrincipal principalObject = new MPrincipal(principal, principalType);
 
     client.grantRole(
       Arrays.asList(roleObject),

http://git-wip-us.apache.org/repos/asf/sqoop/blob/a375d462/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java b/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java
index b49a9ad..e0b86cf 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/RevokePrivilegeFunction.java
@@ -92,9 +92,9 @@ public class RevokePrivilegeFunction extends SqoopFunction {
   private Status revokePrivilege(String action, String resourceType, String resource,
                                  String principalType, String principal, boolean withGrant)
     throws IOException {
-    MResource resourceObject = new MResource(resourceType, resource);
+    MResource resourceObject = new MResource(resource, resourceType);
     MPrivilege privilegeObject = new MPrivilege(resourceObject, action, withGrant);
-    MPrincipal principalObject = new MPrincipal(principalType, principal);
+    MPrincipal principalObject = new MPrincipal(principal, principalType);
 
     client.revokePrivilege(
       Arrays.asList(principalObject),

http://git-wip-us.apache.org/repos/asf/sqoop/blob/a375d462/shell/src/main/java/org/apache/sqoop/shell/RevokeRoleFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/RevokeRoleFunction.java b/shell/src/main/java/org/apache/sqoop/shell/RevokeRoleFunction.java
index cf69faa..97afda2 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/RevokeRoleFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/RevokeRoleFunction.java
@@ -69,7 +69,7 @@ public class RevokeRoleFunction extends SqoopFunction {
 
   private Status revokeRole(String role, String principalType, String principal) throws IOException
{
     MRole roleObject = new MRole(role);
-    MPrincipal principalObject = new MPrincipal(principalType, principal);
+    MPrincipal principalObject = new MPrincipal(principal, principalType);
 
     client.revokeRole(
       Arrays.asList(roleObject),


Mime
View raw message