accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1437810 - in /accumulo/trunk: server/src/main/java/org/apache/accumulo/server/ server/src/main/java/org/apache/accumulo/server/constraints/ server/src/main/java/org/apache/accumulo/server/master/ server/src/main/java/org/apache/accumulo/se...
Date Thu, 24 Jan 2013 00:09:23 GMT
Author: kturner
Date: Thu Jan 24 00:09:23 2013
New Revision: 1437810

URL: http://svn.apache.org/viewvc?rev=1437810&view=rev
Log:
ACCUMULO-462 ACCUMULO-867 made constraints reload and use new context classloader

Removed:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintLoader.java
Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintChecker.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/FileManager.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
    accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/Accumulo.java Thu Jan 24
00:09:23 2013
@@ -23,7 +23,6 @@ import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Map.Entry;
-import java.util.TimerTask;
 import java.util.TreeMap;
 
 import org.apache.accumulo.core.Constants;
@@ -141,7 +140,7 @@ public class Accumulo {
    * 
    */
   public static void monitorSwappiness() {
-    SimpleTimer.getInstance().schedule(new TimerTask() {
+    SimpleTimer.getInstance().schedule(new Runnable() {
       @Override
       public void run() {
         try {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintChecker.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintChecker.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintChecker.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintChecker.java
Thu Jan 24 00:09:23 2013
@@ -19,13 +19,18 @@ package org.apache.accumulo.server.const
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map.Entry;
+import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.constraints.Constraint;
-import org.apache.accumulo.core.constraints.Violations;
 import org.apache.accumulo.core.constraints.Constraint.Environment;
+import org.apache.accumulo.core.constraints.Violations;
 import org.apache.accumulo.core.data.ComparableBytes;
 import org.apache.accumulo.core.data.ConstraintViolationSummary;
 import org.apache.accumulo.core.data.Mutation;
+import org.apache.accumulo.server.conf.TableConfiguration;
+import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
 import org.apache.log4j.Logger;
 
 public class ConstraintChecker {
@@ -33,14 +38,67 @@ public class ConstraintChecker {
   private ArrayList<Constraint> constrains;
   private static final Logger log = Logger.getLogger(ConstraintChecker.class);
   
-  public ConstraintChecker() {
+  private ClassLoader loader;
+  private TableConfiguration conf;
+
+  private AtomicLong lastCheck = new AtomicLong(0);
+
+  public ConstraintChecker(TableConfiguration conf) {
     constrains = new ArrayList<Constraint>();
+    
+    this.conf = conf;
+
+    try {
+      String context = conf.get(Property.TABLE_CLASSPATH);
+
+      if (context != null && !context.equals("")) {
+        loader = AccumuloVFSClassLoader.getContextManager().getClassLoader(context);
+      } else {
+        loader = AccumuloVFSClassLoader.getClassLoader();
+      }
+      
+      for (Entry<String,String> entry : conf) {
+        if (entry.getKey().startsWith(Property.TABLE_CONSTRAINT_PREFIX.getKey())) {
+          String className = entry.getValue();
+          Class<? extends Constraint> clazz = loader.loadClass(className).asSubclass(Constraint.class);
+          log.debug("Loaded constraint " + clazz.getName() + " for " + conf.getTableId());
+          constrains.add(clazz.newInstance());
+        }
+      }
+      
+      lastCheck.set(System.currentTimeMillis());
+
+    } catch (Throwable e) {
+      constrains.clear();
+      loader = null;
+      constrains.add(new UnsatisfiableConstraint((short) -1, "Failed to load constraints,
not accepting mutations."));
+      log.error("Failed to load constraints " + conf.getTableId() + " " + e.toString(), e);
+    }
   }
   
-  public void addConstraint(Constraint c) {
-    constrains.add(c);
+  public boolean classLoaderChanged() {
+    
+    if (constrains.size() == 0)
+      return false;
+
+    try {
+      String context = conf.get(Property.TABLE_CLASSPATH);
+      
+      ClassLoader currentLoader;
+      
+      if (context != null && !context.equals("")) {
+        currentLoader = AccumuloVFSClassLoader.getContextManager().getClassLoader(context);
+      } else {
+        currentLoader = AccumuloVFSClassLoader.getClassLoader();
+      }
+      
+      return currentLoader != loader;
+    } catch (Exception e) {
+      log.debug("Failed to check " + e.getMessage());
+      return true;
+    }
   }
-  
+
   public Violations check(Environment env, Mutation m) {
     
     Violations violations = null;

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
Thu Jan 24 00:09:23 2013
@@ -27,7 +27,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
-import java.util.TimerTask;
 
 import org.apache.accumulo.cloudtrace.instrument.Tracer;
 import org.apache.accumulo.core.Constants;
@@ -226,7 +225,7 @@ public class LiveTServerSet implements W
   
   public synchronized void startListeningForTabletServerChanges() {
     scanServers();
-    SimpleTimer.getInstance().schedule(new TimerTask() {
+    SimpleTimer.getInstance().schedule(new Runnable() {
       @Override
       public void run() {
         scanServers();

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=1437810&r1=1437809&r2=1437810&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 24 00:09:23 2013
@@ -32,7 +32,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.SortedMap;
-import java.util.TimerTask;
 import java.util.TreeMap;
 import java.util.TreeSet;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -256,7 +255,7 @@ public class Master implements LiveTServ
     if (newState == MasterState.STOP) {
       // Give the server a little time before shutdown so the client
       // thread requesting the stop can return
-      SimpleTimer.getInstance().schedule(new TimerTask() {
+      SimpleTimer.getInstance().schedule(new Runnable() {
         @Override
         public void run() {
           // This frees the main thread and will cause the master to exit
@@ -2135,7 +2134,7 @@ public class Master implements LiveTServ
       
       fate = new Fate<Master>(this, store, threads);
       
-      SimpleTimer.getInstance().schedule(new TimerTask() {
+      SimpleTimer.getInstance().schedule(new Runnable() {
         
         @Override
         public void run() {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/FileManager.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/FileManager.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/FileManager.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/FileManager.java
Thu Jan 24 00:09:23 2013
@@ -113,7 +113,7 @@ public class FileManager {
   
   private final ServerConfiguration conf;
   
-  private class IdleFileCloser extends TimerTask {
+  private class IdleFileCloser implements Runnable {
     
     @Override
     public void run() {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Thu Jan 24 00:09:23 2013
@@ -98,8 +98,6 @@ import org.apache.accumulo.server.client
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.constraints.ConstraintChecker;
-import org.apache.accumulo.server.constraints.ConstraintLoader;
-import org.apache.accumulo.server.constraints.UnsatisfiableConstraint;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.problems.ProblemReport;
 import org.apache.accumulo.server.problems.ProblemReports;
@@ -1367,19 +1365,7 @@ public class Tablet {
     acuTableConf.addObserver(configObserver = new ConfigurationObserver() {
       
       private void reloadConstraints() {
-        
-        ConstraintChecker cc = null;
-        
-        try {
-          log.debug("Reloading constraints");
-          cc = ConstraintLoader.load(getTableConfiguration());
-        } catch (IOException e) {
-          log.error("Failed to reload constraints for " + extent, e);
-          cc = new ConstraintChecker();
-          cc.addConstraint(new UnsatisfiableConstraint((short) -1, "Failed to reload constraints,
not accepting mutations."));
-        }
-        
-        constraintChecker.set(cc);
+        constraintChecker.set(new ConstraintChecker(getTableConfiguration()));
       }
       
       public void propertiesChanged() {
@@ -2491,6 +2477,15 @@ public class Tablet {
     return commitSession;
   }
   
+  public void checkConstraints() {
+    ConstraintChecker cc = constraintChecker.get();
+    
+    if (cc.classLoaderChanged()) {
+      ConstraintChecker ncc = new ConstraintChecker(getTableConfiguration());
+      constraintChecker.compareAndSet(cc, ncc);
+    }
+  }
+
   public CommitSession prepareMutationsForCommit(TservConstraintEnv cenv, List<Mutation>
mutations) throws TConstraintViolationException {
     
     ConstraintChecker cc = constraintChecker.get();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Thu Jan 24 00:09:23 2013
@@ -247,7 +247,7 @@ public class TabletServer extends Abstra
     this.instance = conf.getInstance();
     this.fs = TraceFileSystem.wrap(fs);
     this.logSorter = new LogSorter(instance, fs, getSystemConfiguration());
-    SimpleTimer.getInstance().schedule(new TimerTask() {
+    SimpleTimer.getInstance().schedule(new Runnable() {
       @Override
       public void run() {
         synchronized (onlineTablets) {
@@ -349,7 +349,7 @@ public class TabletServer extends Abstra
       
       final long maxIdle = conf.getTimeInMillis(Property.TSERV_SESSION_MAXIDLE);
       
-      TimerTask r = new TimerTask() {
+      Runnable r = new Runnable() {
         @Override
         public void run() {
           sweep(maxIdle);
@@ -3112,7 +3112,7 @@ public class TabletServer extends Abstra
     }
     
     // A task that cleans up unused classloader contexts
-    TimerTask contextCleaner = new TimerTask() {
+    Runnable contextCleaner = new Runnable() {
       @Override
       public void run() {
         ArrayList<KeyExtent> extents;
@@ -3148,7 +3148,7 @@ public class TabletServer extends Abstra
     
     FileSystemMonitor.start(getSystemConfiguration(), Property.TSERV_MONITOR_FS);
     
-    TimerTask gcDebugTask = new TimerTask() {
+    Runnable gcDebugTask = new Runnable() {
       @Override
       public void run() {
         logGCInfo(getSystemConfiguration());
@@ -3157,6 +3157,24 @@ public class TabletServer extends Abstra
     
     SimpleTimer.getInstance().schedule(gcDebugTask, 0, 1000);
     
+    Runnable constraintTask = new Runnable() {
+      
+      @Override
+      public void run() {
+        ArrayList<Tablet> tablets;
+        
+        synchronized (onlineTablets) {
+          tablets = new ArrayList<Tablet>(onlineTablets.values());
+        }
+        
+        for (Tablet tablet : tablets) {
+          tablet.checkConstraints();
+        }
+      }
+    };
+    
+    SimpleTimer.getInstance().schedule(constraintTask, 0, 1000);
+
     this.resourceManager = new TabletServerResourceManager(instance, fs);
     
     lastPingTime = System.currentTimeMillis();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
Thu Jan 24 00:09:23 2013
@@ -25,7 +25,6 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.SortedMap;
-import java.util.TimerTask;
 import java.util.TreeMap;
 import java.util.TreeSet;
 import java.util.concurrent.BlockingQueue;
@@ -104,7 +103,7 @@ public class TabletServerResourceManager
   
   private ExecutorService addEs(final Property maxThreads, String name, final ThreadPoolExecutor
tp) {
     ExecutorService result = addEs(name, tp);
-    SimpleTimer.getInstance().schedule(new TimerTask() {
+    SimpleTimer.getInstance().schedule(new Runnable() {
       @Override
       public void run() {
         try {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
Thu Jan 24 00:09:23 2013
@@ -19,7 +19,6 @@ package org.apache.accumulo.server.trace
 import java.net.InetSocketAddress;
 import java.net.ServerSocket;
 import java.nio.channels.ServerSocketChannel;
-import java.util.TimerTask;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.cloudtrace.instrument.Span;
@@ -184,7 +183,7 @@ public class TraceServer implements Watc
   }
   
   public void run() throws Exception {
-    SimpleTimer.getInstance().schedule(new TimerTask() {
+    SimpleTimer.getInstance().schedule(new Runnable() {
       @Override
       public void run() {
         flush();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
Thu Jan 24 00:09:23 2013
@@ -23,7 +23,6 @@ import java.net.ServerSocket;
 import java.net.UnknownHostException;
 import java.nio.channels.ServerSocketChannel;
 import java.util.Random;
-import java.util.TimerTask;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ThreadPoolExecutor;
 
@@ -193,7 +192,7 @@ public class TServerUtils {
      */
     final ThreadPoolExecutor pool = new SimpleThreadPool(numThreads, "ClientPool");
     // periodically adjust the number of threads we need by checking how busy our threads
are
-    SimpleTimer.getInstance().schedule(new TimerTask() {
+    SimpleTimer.getInstance().schedule(new Runnable() {
       @Override
       public void run() {
         if (pool.getCorePoolSize() <= pool.getActiveCount()) {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
Thu Jan 24 00:09:23 2013
@@ -19,6 +19,8 @@ package org.apache.accumulo.server.util.
 import java.util.Timer;
 import java.util.TimerTask;
 
+import org.apache.log4j.Logger;
+
 /**
  * Generic singleton timer: don't use it if you are going to do anything that will take very
long. Please use it to reduce the number of threads dedicated to
  * simple events.
@@ -26,6 +28,25 @@ import java.util.TimerTask;
  */
 public class SimpleTimer {
   
+  static class LoggingTimerTask extends TimerTask {
+    
+    private Runnable task;
+    
+    LoggingTimerTask(Runnable task) {
+      this.task = task;
+    }
+    
+    @Override
+    public void run() {
+      try {
+        task.run();
+      } catch (Throwable t) {
+        Logger.getLogger(LoggingTimerTask.class).warn("Timer task failed " + task.getClass().getName()
+ " " + t.getMessage(), t);
+      }
+    }
+    
+  }
+
   private static SimpleTimer instance;
   private Timer timer;
   
@@ -39,12 +60,12 @@ public class SimpleTimer {
     timer = new Timer("SimpleTimer", true);
   }
   
-  public void schedule(TimerTask task, long delay) {
-    timer.schedule(task, delay);
+  public void schedule(Runnable task, long delay) {
+    timer.schedule(new LoggingTimerTask(task), delay);
   }
   
-  public void schedule(TimerTask task, long delay, long period) {
-    timer.schedule(task, delay, period);
+  public void schedule(Runnable task, long delay, long period) {
+    timer.schedule(new LoggingTimerTask(task), delay, period);
   }
   
 }

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
Thu Jan 24 00:09:23 2013
@@ -20,7 +20,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Random;
 import java.util.Set;
-import java.util.TimerTask;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -189,7 +188,7 @@ public class DistributedWorkQueue {
     
     Random r = new Random();
     // Add a little jitter to avoid all the tservers slamming zookeeper at once
-    SimpleTimer.getInstance().schedule(new TimerTask() {
+    SimpleTimer.getInstance().schedule(new Runnable() {
       @Override
       public void run() {
         try {

Modified: accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
(original)
+++ accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
Thu Jan 24 00:09:23 2013
@@ -119,7 +119,7 @@ public class ContextManager {
     synchronized (this) {
       // only manipulate internal data structs in this sync block... avoid creating or closing
classloader, reading config, etc... basically avoid operations
       // that may block
-      context = contexts.get(context);
+      context = contexts.get(contextName);
       
       if (context == null) {
         context = new Context(cconfig);

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java?rev=1437810&r1=1437809&r2=1437810&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/MiniAccumuloCluster.java Thu
Jan 24 00:09:23 2013
@@ -32,7 +32,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Random;
-import java.util.TimerTask;
 
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.util.UtilWaitThread;
@@ -63,7 +62,7 @@ public class MiniAccumuloCluster {
       this.in = new BufferedReader(new InputStreamReader(stream));
       out = new BufferedWriter(new FileWriter(logFile));
       
-      SimpleTimer.getInstance().schedule(new TimerTask() {
+      SimpleTimer.getInstance().schedule(new Runnable() {
         @Override
         public void run() {
           try {



Mime
View raw message