accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1468934 - /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
Date Wed, 17 Apr 2013 14:35:21 GMT
Author: ecn
Date: Wed Apr 17 14:35:20 2013
New Revision: 1468934

URL: http://svn.apache.org/r1468934
Log:
ACCUMULO-1284 use different scanners for root/meta sections, limit scan to the tablet info
range 

Modified:
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java?rev=1468934&r1=1468933&r2=1468934&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
Wed Apr 17 14:35:20 2013
@@ -16,13 +16,13 @@
  */
 package org.apache.accumulo.server.util;
 
+import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.conf.DefaultConfiguration;
-import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.server.master.LiveTServerSet;
@@ -33,6 +33,7 @@ import org.apache.accumulo.server.master
 import org.apache.accumulo.server.master.state.TabletState;
 import org.apache.accumulo.server.master.state.tables.TableManager;
 import org.apache.accumulo.server.security.SecurityConstants;
+import org.apache.commons.collections.iterators.IteratorChain;
 import org.apache.log4j.Logger;
 
 public class FindOfflineTablets {
@@ -46,7 +47,10 @@ public class FindOfflineTablets {
     opts.parseArgs(FindOfflineTablets.class.getName(), args);
     final AtomicBoolean scanning = new AtomicBoolean(false);
     Instance instance = opts.getInstance();
-    MetaDataTableScanner scanner = new MetaDataTableScanner(instance, SecurityConstants.getSystemCredentials(),
new Range());
+    MetaDataTableScanner rootScanner = new MetaDataTableScanner(instance, SecurityConstants.getSystemCredentials(),
Constants.METADATA_ROOT_TABLET_KEYSPACE);
+    MetaDataTableScanner metaScanner = new MetaDataTableScanner(instance, SecurityConstants.getSystemCredentials(),
Constants.NON_ROOT_METADATA_KEYSPACE);
+    @SuppressWarnings("unchecked")
+    Iterator<TabletLocationState> scanner = (Iterator<TabletLocationState>)new
IteratorChain(rootScanner, metaScanner);
     LiveTServerSet tservers = new LiveTServerSet(instance, DefaultConfiguration.getDefaultConfiguration(),
new Listener() {
       @Override
       public void update(LiveTServerSet current, Set<TServerInstance> deleted, Set<TServerInstance>
added) {



Mime
View raw message