accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1431449 - in /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master: ./ tableOps/ tserverOps/
Date Thu, 10 Jan 2013 15:53:04 GMT
Author: ecn
Date: Thu Jan 10 15:53:03 2013
New Revision: 1431449

URL: http://svn.apache.org/viewvc?rev=1431449&view=rev
Log:
ACCUMULO-717 use master.getConnector instead of HdfsZooInstance in fate operations

Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ExportTable.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java Thu
Jan 10 15:53:03 2013
@@ -501,7 +501,7 @@ public class Master implements LiveTServ
       throw new ThriftTableOperationException(tableId, null, TableOperation.MERGE, TableOperationExceptionType.OFFLINE,
"table is not online");
   }
   
-  Connector getConnector() throws AccumuloException, AccumuloSecurityException {
+  public Connector getConnector() throws AccumuloException, AccumuloSecurityException {
     return instance.getConnector(SecurityConstants.getSystemCredentials());
   }
   

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
Thu Jan 10 15:53:03 2013
@@ -56,7 +56,6 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.file.FileOperations;
 import org.apache.accumulo.core.master.state.tables.TableState;
-import org.apache.accumulo.core.security.thrift.AuthInfo;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.SimpleThreadPool;
 import org.apache.accumulo.core.util.UtilWaitThread;
@@ -291,8 +290,7 @@ class CleanUpBulkImport extends MasterRe
     MetadataTable.removeBulkLoadInProgressFlag("/" + bulkDir.getParent().getName() + "/"
+ bulkDir.getName());
     MetadataTable.addDeleteEntry(tableId, "/" + bulkDir.getName());
     log.debug("removing the metadata table markers for loaded files");
-    AuthInfo creds = SecurityConstants.getSystemCredentials();
-    Connector conn = HdfsZooInstance.getInstance().getConnector(creds.user, creds.password);
+    Connector conn = master.getConnector();
     MetadataTable.removeBulkLoadEntries(conn, tableId, tid);
     log.debug("releasing HDFS reservations for " + source + " and " + error);
     Utils.unreserveHdfsDirectory(source, tid);
@@ -360,10 +358,10 @@ class CopyFailed extends MasterRepo {
   }
   
   @Override
-  public Repo<Master> call(long tid, Master environment) throws Exception {
+  public Repo<Master> call(long tid, Master master) throws Exception {
 	//This needs to execute after the arbiter is stopped  
 	  
-    FileSystem fs = environment.getFileSystem();
+    FileSystem fs = master.getFileSystem();
 	  
     if (!fs.exists(new Path(error, "failures.txt")))
       return new CleanUpBulkImport(tableId, source, bulk, error);
@@ -390,8 +388,7 @@ class CopyFailed extends MasterRepo {
      */
 
     // determine which failed files were loaded
-    AuthInfo creds = SecurityConstants.getSystemCredentials();
-    Connector conn = HdfsZooInstance.getInstance().getConnector(creds.user, creds.password);
+    Connector conn = master.getConnector();
     Scanner mscanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME,
Constants.NO_AUTHS));
     mscanner.setRange(new KeyExtent(new Text(tableId), null, null).toMetadataRange());
     mscanner.fetchColumnFamily(Constants.METADATA_BULKFILE_COLUMN_FAMILY);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
Thu Jan 10 15:53:03 2013
@@ -47,7 +47,6 @@ import org.apache.accumulo.server.client
 import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.master.state.TServerInstance;
-import org.apache.accumulo.server.security.SecurityConstants;
 import org.apache.accumulo.server.util.MapCounter;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.commons.codec.binary.Hex;
@@ -77,8 +76,7 @@ class CompactionDriver extends MasterRep
   public long isReady(long tid, Master master) throws Exception {
     
     MapCounter<TServerInstance> serversToFlush = new MapCounter<TServerInstance>();
-    Instance instance = HdfsZooInstance.getInstance();
-    Connector conn = instance.getConnector(SecurityConstants.getSystemCredentials());
+    Connector conn = master.getConnector();
     Scanner scanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME,
Constants.NO_AUTHS));
     
     Range range = new KeyExtent(new Text(tableId), null, startRow == null ? null : new Text(startRow)).toMetadataRange();
@@ -131,6 +129,7 @@ class CompactionDriver extends MasterRep
     
     long scanTime = System.currentTimeMillis() - t1;
     
+    Instance instance = master.getInstance();
     Tables.clearCache(instance);
     if (tabletCount == 0 && !Tables.exists(instance, tableId))
       throw new ThriftTableOperationException(tableId, null, TableOperation.COMPACT, TableOperationExceptionType.NOTFOUND,
null);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java
Thu Jan 10 15:53:03 2013
@@ -34,7 +34,6 @@ import org.apache.accumulo.core.util.Cac
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.server.ServerConstants;
-import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.master.state.tables.TableManager;
@@ -180,13 +179,13 @@ class PopulateZookeeper extends MasterRe
   }
   
   @Override
-  public Repo<Master> call(long tid, Master env) throws Exception {
+  public Repo<Master> call(long tid, Master master) throws Exception {
     // reserve the table name in zookeeper or fail
     
     Utils.tableNameLock.lock();
     try {
       // write tableName & tableId to zookeeper
-      Instance instance = HdfsZooInstance.getInstance();
+      Instance instance = master.getInstance();
       
       Utils.checkTableDoesNotExist(instance, tableInfo.tableName, tableInfo.tableId, TableOperation.CREATE);
       
@@ -204,8 +203,8 @@ class PopulateZookeeper extends MasterRe
   }
   
   @Override
-  public void undo(long tid, Master env) throws Exception {
-    Instance instance = HdfsZooInstance.getInstance();
+  public void undo(long tid, Master master) throws Exception {
+    Instance instance = master.getInstance();
     TableManager.getInstance().removeTable(tableInfo.tableId);
     Utils.unreserveTable(tableInfo.tableId, tid, true);
     Tables.clearCache(instance);
@@ -273,7 +272,7 @@ public class CreateTable extends MasterR
   }
   
   @Override
-  public Repo<Master> call(long tid, Master env) throws Exception {
+  public Repo<Master> call(long tid, Master master) throws Exception {
     // first step is to reserve a table id.. if the machine fails during this step
     // it is ok to retry... the only side effect is that a table id may not be used
     // or skipped
@@ -282,8 +281,7 @@ public class CreateTable extends MasterR
     
     Utils.idLock.lock();
     try {
-      Instance instance = HdfsZooInstance.getInstance();
-      tableInfo.tableId = Utils.getNextTableId(tableInfo.tableName, instance);
+      tableInfo.tableId = Utils.getNextTableId(tableInfo.tableName, master.getInstance());
       return new SetupPermissions(tableInfo);
     } finally {
       Utils.idLock.unlock();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
Thu Jan 10 15:53:03 2013
@@ -24,7 +24,6 @@ import org.apache.accumulo.core.Constant
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchScanner;
 import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.impl.Tables;
@@ -38,7 +37,6 @@ import org.apache.accumulo.core.master.s
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.server.ServerConstants;
-import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.master.state.MetaDataTableScanner;
 import org.apache.accumulo.server.master.state.TabletLocationState;
@@ -83,16 +81,15 @@ class CleanUp extends MasterRepo {
   }
   
   @Override
-  public long isReady(long tid, Master environment) throws Exception {
-    if (!environment.hasCycled(creationTime)) {
+  public long isReady(long tid, Master master) throws Exception {
+    if (!master.hasCycled(creationTime)) {
       return 50;
     }
     
     boolean done = true;
     Range tableRange = new KeyExtent(new Text(tableId), null, null).toMetadataRange();
-    Scanner scanner = environment.getInstance().getConnector(SecurityConstants.getSystemCredentials())
-        .createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
-    MetaDataTableScanner.configureScanner(scanner, environment);
+    Scanner scanner = master.getConnector().createScanner(Constants.METADATA_TABLE_NAME,
Constants.NO_AUTHS);
+    MetaDataTableScanner.configureScanner(scanner, master);
     scanner.setRange(tableRange);
     
     KeyExtent prevExtent = null;
@@ -105,7 +102,7 @@ class CleanUp extends MasterRepo {
       }
       prevExtent = locationState.extent;
       
-      TabletState state = locationState.getState(environment.onlineTabletServers());
+      TabletState state = locationState.getState(master.onlineTabletServers());
       if (state.equals(TabletState.ASSIGNED) || state.equals(TabletState.HOSTED)) {
         log.debug("Still waiting for table to be deleted: " + tableId + " locationState:
" + locationState);
         done = false;
@@ -120,17 +117,15 @@ class CleanUp extends MasterRepo {
   }
   
   @Override
-  public Repo<Master> call(long tid, Master environment) throws Exception {
-    
-    Instance instance = HdfsZooInstance.getInstance();
+  public Repo<Master> call(long tid, Master master) throws Exception {
     
-    environment.clearMigrations(tableId);
+    master.clearMigrations(tableId);
     
     int refCount = 0;
     
     try {
       // look for other tables that references this tables files
-      Connector conn = instance.getConnector(SecurityConstants.getSystemCredentials());
+      Connector conn = master.getConnector();
       BatchScanner bs = conn.createBatchScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS,
8);
       try {
         bs.setRanges(Collections.singleton(Constants.NON_ROOT_METADATA_KEYSPACE));
@@ -183,7 +178,7 @@ class CleanUp extends MasterRepo {
     // remove table from zookeeper
     try {
       TableManager.getInstance().removeTable(tableId);
-      Tables.clearCache(instance);
+      Tables.clearCache(master.getInstance());
     } catch (Exception e) {
       log.error("Failed to find table id in zookeeper", e);
     }

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ExportTable.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ExportTable.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ExportTable.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ExportTable.java
Thu Jan 10 15:53:03 2013
@@ -51,7 +51,6 @@ import org.apache.accumulo.server.Server
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.master.Master;
-import org.apache.accumulo.server.security.SecurityConstants;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -86,13 +85,13 @@ class WriteExportFiles extends MasterRep
   }
   
   @Override
-  public long isReady(long tid, Master env) throws Exception {
+  public long isReady(long tid, Master master) throws Exception {
     
     long reserved = Utils.reserveTable(tableInfo.tableID, tid, false, true, TableOperation.EXPORT);
     if (reserved > 0)
       return reserved;
 
-    Connector conn = env.getInstance().getConnector(SecurityConstants.getSystemCredentials());
+    Connector conn = master.getConnector();
     
     checkOffline(conn);
     
@@ -121,11 +120,11 @@ class WriteExportFiles extends MasterRep
   }
 
   @Override
-  public Repo<Master> call(long tid, Master env) throws Exception {
-    Connector conn = env.getInstance().getConnector(SecurityConstants.getSystemCredentials());
+  public Repo<Master> call(long tid, Master master) throws Exception {
+    Connector conn = master.getConnector();
 
     try {
-      exportTable(env.getFileSystem(), conn, tableInfo.tableName, tableInfo.tableID, tableInfo.exportDir);
+      exportTable(master.getFileSystem(), conn, tableInfo.tableName, tableInfo.tableID, tableInfo.exportDir);
     } catch (IOException ioe) {
       throw new ThriftTableOperationException(tableInfo.tableID, tableInfo.tableName, TableOperation.EXPORT,
TableOperationExceptionType.OTHER,
           "Failed to create export files " + ioe.getMessage());

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java
Thu Jan 10 15:53:03 2013
@@ -134,9 +134,9 @@ class MoveExportedFiles extends MasterRe
   }
   
   @Override
-  public Repo<Master> call(long tid, Master environment) throws Exception {
+  public Repo<Master> call(long tid, Master master) throws Exception {
     try {
-      FileSystem fs = environment.getFileSystem();
+      FileSystem fs = master.getFileSystem();
       
       Map<String,String> fileNameMappings = PopulateMetadataTable.readMappingFile(fs,
tableInfo);
       
@@ -195,7 +195,7 @@ class PopulateMetadataTable extends Mast
   }
 
   @Override
-  public Repo<Master> call(long tid, Master environment) throws Exception {
+  public Repo<Master> call(long tid, Master master) throws Exception {
     
     Path path = new Path(tableInfo.exportDir, Constants.EXPORT_FILE);
     
@@ -203,10 +203,9 @@ class PopulateMetadataTable extends Mast
     ZipInputStream zis = null;
 
     try {
-      FileSystem fs = environment.getFileSystem();
+      FileSystem fs = master.getFileSystem();
       
-      mbw = HdfsZooInstance.getInstance().getConnector(SecurityConstants.getSystemCredentials())
-          .createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
+      mbw = master.getConnector().createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
 
       zis = new ZipInputStream(fs.open(path));
       

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java
Thu Jan 10 15:53:03 2013
@@ -26,7 +26,6 @@ import org.apache.accumulo.core.zookeepe
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.ZooReaderWriter.Mutator;
-import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.log4j.Logger;
@@ -50,9 +49,9 @@ public class RenameTable extends MasterR
   }
   
   @Override
-  public Repo<Master> call(long tid, Master env) throws Exception {
+  public Repo<Master> call(long tid, Master master) throws Exception {
     
-    Instance instance = HdfsZooInstance.getInstance();
+    Instance instance = master.getInstance();
     
     IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
     Utils.tableNameLock.lock();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java
Thu Jan 10 15:53:03 2013
@@ -20,11 +20,9 @@ import org.apache.accumulo.core.Constant
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.impl.thrift.TableOperation;
 import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
 import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.util.TextUtil;
 import org.apache.accumulo.fate.Repo;
@@ -32,7 +30,6 @@ import org.apache.accumulo.server.master
 import org.apache.accumulo.server.master.state.MergeInfo;
 import org.apache.accumulo.server.master.state.MergeInfo.Operation;
 import org.apache.accumulo.server.master.state.MergeState;
-import org.apache.accumulo.server.security.SecurityConstants;
 import org.apache.accumulo.server.util.MetadataTable;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
@@ -59,11 +56,9 @@ class MakeDeleteEntries extends MasterRe
   @Override
   public Repo<Master> call(long tid, Master master) throws Exception {
     log.info("creating delete entries for merged metadata tablets");
-    Instance instance = master.getInstance();
-    Connector conn = instance.getConnector(SecurityConstants.getSystemCredentials());
+    Connector conn = master.getConnector();
     BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
-    AccumuloConfiguration conf = instance.getConfiguration();
-    String tableDir = Constants.getMetadataTableDir(conf);
+    String tableDir = Constants.getMetadataTableDir(master.getConfiguration().getConfiguration());
     for (FileStatus fs : master.getFileSystem().listStatus(new Path(tableDir))) {
       // TODO: add the entries only if there are no !METADATA table references
       if (fs.isDir() && fs.getPath().getName().matches("^" + Constants.GENERATED_TABLET_DIRECTORY_PREFIX
+ ".*")) {
@@ -94,11 +89,11 @@ class TableRangeOpWait extends MasterRep
   }
   
   @Override
-  public Repo<Master> call(long tid, Master env) throws Exception {
+  public Repo<Master> call(long tid, Master master) throws Exception {
     Text tableIdText = new Text(tableId);
-    MergeInfo mergeInfo = env.getMergeInfo(tableIdText);
+    MergeInfo mergeInfo = master.getMergeInfo(tableIdText);
     log.warn("removing merge information " + mergeInfo);
-    env.clearMergeState(tableIdText);
+    master.clearMergeState(tableIdText);
     Utils.unreserveTable(tableId, tid, true);
     // We can't add entries to the metadata table if it is offline for this merge.
     // If the delete entries for the metadata table were in the root tablet, it would work
just fine

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java?rev=1431449&r1=1431448&r2=1431449&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java
Thu Jan 10 15:53:03 2013
@@ -51,29 +51,29 @@ public class ShutdownTServer extends Mas
   }
   
   @Override
-  public Repo<Master> call(long tid, Master m) throws Exception {
+  public Repo<Master> call(long tid, Master master) throws Exception {
     // suppress assignment of tablets to the server
     if (force) {
       String tserver = AddressUtil.toString(server.getLocation());
-      String path = ZooUtil.getRoot(m.getInstance()) + Constants.ZTSERVERS + "/" + tserver;
+      String path = ZooUtil.getRoot(master.getInstance()) + Constants.ZTSERVERS + "/" + tserver;
       ZooLock.deleteLock(path);
-      path = ZooUtil.getRoot(m.getInstance()) + Constants.ZDEADTSERVERS + "/" + tserver;
+      path = ZooUtil.getRoot(master.getInstance()) + Constants.ZDEADTSERVERS + "/" + tserver;
       IZooReaderWriter zoo = ZooReaderWriter.getInstance();
       zoo.putPersistentData(path, "forced down".getBytes(), NodeExistsPolicy.OVERWRITE);
       return null;
     }
     
     // TODO move this to isReady() and drop while loop?
-    Listener listener = m.getEventCoordinator().getListener();
-    m.shutdownTServer(server);
-    while (m.onlineTabletServers().contains(server)) {
-      TServerConnection connection = m.getConnection(server);
+    Listener listener = master.getEventCoordinator().getListener();
+    master.shutdownTServer(server);
+    while (master.onlineTabletServers().contains(server)) {
+      TServerConnection connection = master.getConnection(server);
       if (connection != null) {
         try {
           TabletServerStatus status = connection.getTableMap();
           if (status.tableMap != null && status.tableMap.isEmpty()) {
             log.info("tablet server hosts no tablets " + server);
-            connection.halt(m.getMasterLock());
+            connection.halt(master.getMasterLock());
             log.info("tablet server asked to halt " + server);
             break;
           }



Mime
View raw message