flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hshreedha...@apache.org
Subject flume git commit: FLUME-2639. SecureThriftRpcClient client privileged calls throw IllegalAccessError
Date Tue, 10 Mar 2015 20:18:10 GMT
Repository: flume
Updated Branches:
  refs/heads/flume-1.6 1b0f051b6 -> 8ccbb0b4b


FLUME-2639. SecureThriftRpcClient client privileged calls throw IllegalAccessError

(Johny Rufus via Hari)


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

Branch: refs/heads/flume-1.6
Commit: 8ccbb0b4b8767c87d680a5c6e5221f0ec280e88e
Parents: 1b0f051
Author: Hari Shreedharan <hshreedharan@apache.org>
Authored: Tue Mar 10 13:17:15 2015 -0700
Committer: Hari Shreedharan <hshreedharan@apache.org>
Committed: Tue Mar 10 13:17:15 2015 -0700

----------------------------------------------------------------------
 .../org/apache/flume/api/SecureThriftRpcClient.java | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/8ccbb0b4/flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java
----------------------------------------------------------------------
diff --git a/flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java b/flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java
index 7316e1b..f31582c 100644
--- a/flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java
+++ b/flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java
@@ -94,11 +94,9 @@ public class SecureThriftRpcClient extends ThriftRpcClient {
         this.privilegedExecutor.execute(
           new PrivilegedExceptionAction<Void>() {
             public Void run() throws FlumeException {
-              try {
-                UgiSaslClientTransport.super.open();
-              } catch (TTransportException e) {
-                throw new FlumeException("Failed to open SASL transport", e);
-              }
+              // this is a workaround to using UgiSaslClientTransport.super.open()
+              // which results in IllegalAccessError
+              callSuperClassOpen();
               return null;
             }
           });
@@ -109,5 +107,13 @@ public class SecureThriftRpcClient extends ThriftRpcClient {
         throw new FlumeException("Failed to open SASL transport", e);
       }
     }
+
+    private void callSuperClassOpen() throws FlumeException {
+      try {
+        super.open();
+      } catch (TTransportException e) {
+        throw new FlumeException("Failed to open SASL transport", e);
+      }
+    }
   }
 }


Mime
View raw message