You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2015/02/11 04:22:50 UTC

accumulo git commit: ACCUMULO-3568 Use the server's connector

Repository: accumulo
Updated Branches:
  refs/heads/master 63544e84e -> 7c5f85044


ACCUMULO-3568 Use the server's connector

Trying to use the client's credentials to make a new connector on the
server doesn't work when kerberos in enabled.


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

Branch: refs/heads/master
Commit: 7c5f85044fa41f38f0a2c3fc7f2a140e6234b860
Parents: 63544e8
Author: Josh Elser <el...@apache.org>
Authored: Tue Feb 10 21:54:29 2015 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Tue Feb 10 22:12:56 2015 -0500

----------------------------------------------------------------------
 .../apache/accumulo/server/client/ClientServiceHandler.java   | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7c5f8504/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
index e4d6040..e81dfbd 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
@@ -31,7 +31,6 @@ import java.util.concurrent.Callable;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
-import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.NamespaceNotFoundException;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -399,9 +398,6 @@ public class ClientServiceHandler implements ClientService.Iface {
   @Override
   public List<TDiskUsage> getDiskUsage(Set<String> tables, TCredentials credentials) throws ThriftTableOperationException, ThriftSecurityException, TException {
     try {
-      final Credentials creds = Credentials.fromThrift(credentials);
-      Connector conn = instance.getConnector(creds.getPrincipal(), creds.getToken());
-
       HashSet<String> tableIds = new HashSet<String>();
 
       for (String table : tables) {
@@ -414,7 +410,8 @@ public class ClientServiceHandler implements ClientService.Iface {
       }
 
       // use the same set of tableIds that were validated above to avoid race conditions
-      Map<TreeSet<String>,Long> diskUsage = TableDiskUsage.getDiskUsage(context.getServerConfigurationFactory().getConfiguration(), tableIds, fs, conn);
+      Map<TreeSet<String>,Long> diskUsage = TableDiskUsage.getDiskUsage(context.getServerConfigurationFactory().getConfiguration(), tableIds, fs,
+          context.getConnector());
       List<TDiskUsage> retUsages = new ArrayList<TDiskUsage>();
       for (Map.Entry<TreeSet<String>,Long> usageItem : diskUsage.entrySet()) {
         retUsages.add(new TDiskUsage(new ArrayList<String>(usageItem.getKey()), usageItem.getValue()));