accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [3/3] accumulo git commit: Merge branch '1.6'
Date Fri, 13 Mar 2015 13:08:50 GMT
Merge branch '1.6'

Conflicts:
	server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java


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

Branch: refs/heads/master
Commit: 23f27828f467617c3c97bf272d55eeb7ce63953f
Parents: 4c9fd4d 1ea9010
Author: Keith Turner <kturner@apache.org>
Authored: Fri Mar 13 08:53:01 2015 -0400
Committer: Keith Turner <kturner@apache.org>
Committed: Fri Mar 13 08:53:01 2015 -0400

----------------------------------------------------------------------
 .../accumulo/server/master/LiveTServerSet.java  | 25 ++++++++++++++++----
 1 file changed, 20 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/23f27828/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
----------------------------------------------------------------------
diff --cc server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
index 917d8d2,332bfc9..c31951f
--- a/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
@@@ -77,15 -80,30 +77,30 @@@ public class LiveTServerSet implements 
      }
  
      private String lockString(ZooLock mlock) {
 -      return mlock.getLockID().serialize(ZooUtil.getRoot(instance) + Constants.ZMASTER_LOCK);
 +      return mlock.getLockID().serialize(ZooUtil.getRoot(context.getInstance()) + Constants.ZMASTER_LOCK);
      }
  
+     private void loadTablet(TabletClientService.Client client, ZooLock lock, KeyExtent extent)
throws TException {
 -      client.loadTablet(Tracer.traceInfo(), SystemCredentials.get().toThrift(instance),
lockString(lock), extent.toThrift());
++      client.loadTablet(Tracer.traceInfo(), context.rpcCreds(), lockString(lock), extent.toThrift());
+     }
+ 
      public void assignTablet(ZooLock lock, KeyExtent extent) throws TException {
-       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(),
address, context);
-       try {
-         client.loadTablet(Tracer.traceInfo(), context.rpcCreds(), lockString(lock), extent.toThrift());
-       } finally {
-         ThriftUtil.returnClient(client);
+       if (extent.isMeta()) {
+         // see ACCUMULO-3597
 -        TTransport transport = ThriftUtil.createTransport(address, conf);
++        TTransport transport = ThriftUtil.createTransport(address, context);
+         try {
+           TabletClientService.Client client = ThriftUtil.createClient(new TabletClientService.Client.Factory(),
transport);
+           loadTablet(client, lock, extent);
+         } finally {
+           transport.close();
+         }
+       } else {
 -        TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(),
address, conf);
++        TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(),
address, context);
+         try {
+           loadTablet(client, lock, extent);
+         } finally {
+           ThriftUtil.returnClient(client);
+         }
        }
      }
  


Mime
View raw message