accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1342773 [3/3] - in /accumulo/branches/ACCUMULO-578: core/src/main/java/org/apache/accumulo/core/ core/src/main/java/org/apache/accumulo/core/conf/ core/src/main/java/org/apache/accumulo/core/master/thrift/ core/src/main/java/org/apache/acc...
Date Fri, 25 May 2012 19:00:03 GMT
Modified: accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/util/AddressUtil.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/util/AddressUtil.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/util/AddressUtil.java
(original)
+++ accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/util/AddressUtil.java
Fri May 25 18:59:59 2012
@@ -25,7 +25,7 @@ public class AddressUtil {
   static public InetSocketAddress parseAddress(String address, int defaultPort) throws NumberFormatException
{
     String[] parts = address.split(":", 2);
     if (address.contains("+"))
-      parts = address.split(":", 2);
+      parts = address.split("\\+", 2);
     if (parts.length == 2) {
       if (parts[1].isEmpty())
         return new InetSocketAddress(parts[0], defaultPort);

Modified: accumulo/branches/ACCUMULO-578/core/src/main/thrift/master.thrift
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/core/src/main/thrift/master.thrift?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/core/src/main/thrift/master.thrift (original)
+++ accumulo/branches/ACCUMULO-578/core/src/main/thrift/master.thrift Fri May 25 18:59:59
2012
@@ -57,7 +57,6 @@ struct TabletServerStatus {
     5:double osLoad
     7:i64 holdTime
     8:i64 lookups
-    9:set<string> loggers
     10:i64 indexCacheHits    
     11:i64 indexCacheRequest   
     12:i64 dataCacheHits   

Modified: accumulo/branches/ACCUMULO-578/core/src/main/thrift/tabletserver.thrift
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/core/src/main/thrift/tabletserver.thrift?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/core/src/main/thrift/tabletserver.thrift (original)
+++ accumulo/branches/ACCUMULO-578/core/src/main/thrift/tabletserver.thrift Fri May 25 18:59:59
2012
@@ -137,8 +137,6 @@ service TabletClientService extends clie
   oneway void chop(1:cloudtrace.TInfo tinfo, 2:security.AuthInfo credentials, 3:string lock,
4:data.TKeyExtent extent),
   oneway void compact(1:cloudtrace.TInfo tinfo, 2:security.AuthInfo credentials, 3:string
lock, 4:string tableId, 5:binary startRow, 6:binary endRow),
   
-  oneway void useLoggers(3:cloudtrace.TInfo tinfo, 1:security.AuthInfo credentials, 2:set<string>
loggers),
-  
   master.TabletServerStatus getTabletServerStatus(3:cloudtrace.TInfo tinfo, 1:security.AuthInfo
credentials) throws (1:security.ThriftSecurityException sec)
   list<TabletStats> getTabletStats(3:cloudtrace.TInfo tinfo, 1:security.AuthInfo credentials,
2:string tableId) throws (1:security.ThriftSecurityException sec)
   TabletStats getHistoricalStats(2:cloudtrace.TInfo tinfo, 1:security.AuthInfo credentials)
throws (1:security.ThriftSecurityException sec)
@@ -147,7 +145,7 @@ service TabletClientService extends clie
   
   list<ActiveScan> getActiveScans(2:cloudtrace.TInfo tinfo, 1:security.AuthInfo credentials)
throws (1:security.ThriftSecurityException sec)
   double sortLog(1:cloudtrace.TInfo tinfo, 2:security.AuthInfo credentials, 3:string lock,
4:string path) throws (1:security.ThriftSecurityException sec);
-  oneway void removeLogs(1:cloudtrace.TInfo tinfo, 2:security.AuthInfo credentials, 3:list<string>
filenames) throws (1:security.ThriftSecurityException sec);
+  oneway void removeLogs(1:cloudtrace.TInfo tinfo, 2:security.AuthInfo credentials, 3:list<string>
filenames)
 }
 
 typedef i32 TabletID

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
Fri May 25 18:59:59 2012
@@ -32,7 +32,6 @@ import org.apache.accumulo.core.conf.Acc
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.gc.thrift.GCStatus;
 import org.apache.accumulo.core.gc.thrift.GcCycleStats;
-import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface;
 import org.apache.accumulo.core.util.ThriftUtil;
@@ -122,8 +121,7 @@ public class GarbageCollectWriteAheadLog
         try {
           tserver = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address,
conf);
           tserver.removeLogs(null, SecurityConstants.getSystemCredentials(), entry.getValue());
-        } catch (ThriftSecurityException e) {
-          log.warn("Unexpected security exception during log file cleanup while talking to
" + address + ". Is your configuration consistent over all nodes?");
+          status.currentLog.deleted += entry.getValue().size();
         } catch (TException e) {
           log.warn("Error talking to " + address + ": " + e);
         } finally {

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
Fri May 25 18:59:59 2012
@@ -133,15 +133,6 @@ public class LiveTServerSet implements W
       }
     }
     
-    public void useLoggers(Set<String> loggers) throws TException {
-      TabletClientService.Iface client = ThriftUtil.getClient(new TabletClientService.Client.Factory(),
address, conf);
-      try {
-        client.useLoggers(null, SecurityConstants.getSystemCredentials(), loggers);
-      } finally {
-        ThriftUtil.returnClient(client);
-      }
-    }
-    
     public void chop(ZooLock lock, KeyExtent extent) throws TException {
       TabletClientService.Iface client = ThriftUtil.getClient(new TabletClientService.Client.Factory(),
address, conf);
       try {

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/Master.java
Fri May 25 18:59:59 2012
@@ -174,7 +174,7 @@ import org.apache.zookeeper.data.Stat;
 
 
 /**
- * The Master is responsible for assigning and balancing tablets and loggers to tablet servers.
+ * The Master is responsible for assigning and balancing tablets to tablet servers.
  * 
  * The master will also coordinate log recoveries and reports general status.
  */

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
Fri May 25 18:59:59 2012
@@ -175,7 +175,6 @@ abstract public class BasicServlet exten
     sb.append("<hr />\n");
     sb.append("<a href='/master'>Master&nbsp;Server</a><br />\n");
     sb.append("<a href='/tservers'>Tablet&nbsp;Servers</a><br />\n");
-    sb.append("<a href='/loggers'>Logger&nbsp;Servers</a><br />\n");
     sb.append("<a href='/vis'>Server Activity</a><br />\n");
     sb.append("<a href='/gc'>Garbage&nbsp;Collector</a><br />\n");
     sb.append("<a href='/tables'>Tables</a><br />\n");

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
Fri May 25 18:59:59 2012
@@ -34,7 +34,6 @@ import org.apache.accumulo.core.master.t
 import org.apache.accumulo.core.master.thrift.MasterState;
 import org.apache.accumulo.core.master.thrift.RecoveryStatus;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
-import org.apache.accumulo.core.util.AddressUtil;
 import org.apache.accumulo.core.util.StringUtil;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.monitor.DedupedLogEvent;
@@ -43,9 +42,9 @@ import org.apache.accumulo.server.monito
 import org.apache.accumulo.server.monitor.util.Table;
 import org.apache.accumulo.server.monitor.util.TableRow;
 import org.apache.accumulo.server.monitor.util.celltypes.DurationType;
-import org.apache.accumulo.server.monitor.util.celltypes.LoggerLinkType;
 import org.apache.accumulo.server.monitor.util.celltypes.NumberType;
 import org.apache.accumulo.server.monitor.util.celltypes.ProgressChartType;
+import org.apache.accumulo.server.util.AddressUtil;
 import org.apache.log4j.Level;
 
 public class MasterServlet extends BasicServlet {
@@ -57,7 +56,7 @@ public class MasterServlet extends Basic
   @Override
   protected String getTitle(HttpServletRequest req) {
     List<String> masters = Monitor.getInstance().getMasterLocations();
-    return "Master Server" + (masters.size() == 0 ? "" : ":" + AddressUtil.parseAddress(masters.get(0),
0).getHostName());
+    return "Master Server" + (masters.size() == 0 ? "" : ":" + AddressUtil.parseAddress(masters.get(0),
Property.MASTER_CLIENTPORT).getHostName());
   }
   
   @Override
@@ -151,7 +150,7 @@ public class MasterServlet extends Basic
       masterStatus.addSortableColumn("OS&nbsp;Load", new NumberType<Double>(0.,
guessHighLoad * 1., 0., guessHighLoad * 3.),
           "The one-minute load average on the computer that runs the monitor web server.");
       TableRow row = masterStatus.prepareRow();
-      row.add(masters.size() == 0 ? "<div class='error'>Down</div>" : AddressUtil.parseAddress(masters.get(0),
0).getHostName());
+      row.add(masters.size() == 0 ? "<div class='error'>Down</div>" : AddressUtil.parseAddress(masters.get(0),
Property.MASTER_CLIENTPORT).getHostName());
       row.add(Monitor.getMmi().tServerInfo.size());
       row.add(slaves.size());
       row.add("<a href='/gc'>" + gcStatus + "</a>");
@@ -178,14 +177,14 @@ public class MasterServlet extends Basic
       if (jobs != null && jobs.size() > 0) {
         Table recoveryTable = new Table("logRecovery", "Log&nbsp;Recovery");
         recoveryTable.setSubCaption("Some tablets were unloaded in an unsafe manner. Write-ahead
logs are being recovered.");
-        recoveryTable.addSortableColumn("Server", new LoggerLinkType(), null);
+        recoveryTable.addSortableColumn("Server");
         recoveryTable.addSortableColumn("Log");
         recoveryTable.addSortableColumn("Time", new DurationType(), null);
         recoveryTable.addSortableColumn("Copy/Sort", new ProgressChartType(), null);
         
         for (RecoveryStatus recovery : jobs) {
           TableRow row = recoveryTable.prepareRow();
-          row.add(recovery);
+          row.add(AddressUtil.parseAddress(recovery.host, Property.TSERV_CLIENTPORT).getHostName());
           row.add(recovery.name);
           row.add((long) recovery.runtime);
           row.add(recovery.copyProgress);

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java
Fri May 25 18:59:59 2012
@@ -79,12 +79,6 @@ public class XMLServlet extends BasicSer
       sb.append("</compactions>\n");
       
       sb.append("<tablets>").append(summary.tablets).append("</tablets>\n");
-      if (status.loggers != null) {
-        sb.append("<loggers>");
-        for (String logger : status.loggers)
-          sb.append("<logger>" + logger + "</logger>");
-        sb.append("</loggers>");
-      }
       
       sb.append("<ingest>").append(summary.ingestRate).append("</ingest>\n");
       sb.append("<query>").append(summary.queryRate).append("</query>\n");

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Fri May 25 18:59:59 2012
@@ -1462,7 +1462,7 @@ public class Tablet {
       for (LogEntry logEntry : logEntries) {
         for (String log : logEntry.logSet) {
           String[] parts = log.split("/", 2);
-          currentLogs.add(new DfsLogger(tabletServer.getServerConfig(), parts[1]));
+          currentLogs.add(new DfsLogger(tabletServer.getServerConfig(), logEntry.server,
parts[1]));
         }
       }
       

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Fri May 25 18:59:59 2012
@@ -23,7 +23,6 @@ import java.io.File;
 import java.io.IOException;
 import java.lang.management.GarbageCollectorMXBean;
 import java.lang.management.ManagementFactory;
-import java.lang.reflect.Constructor;
 import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.net.UnknownHostException;
@@ -99,7 +98,6 @@ import org.apache.accumulo.core.data.thr
 import org.apache.accumulo.core.data.thrift.UpdateErrors;
 import org.apache.accumulo.core.file.FileUtil;
 import org.apache.accumulo.core.iterators.IterationInterruptedException;
-import org.apache.accumulo.core.master.MasterNotRunningException;
 import org.apache.accumulo.core.master.thrift.Compacting;
 import org.apache.accumulo.core.master.thrift.MasterClientService;
 import org.apache.accumulo.core.master.thrift.TableInfo;
@@ -166,9 +164,7 @@ import org.apache.accumulo.server.tablet
 import org.apache.accumulo.server.tabletserver.log.DfsLogger;
 import org.apache.accumulo.server.tabletserver.log.IRemoteLogger;
 import org.apache.accumulo.server.tabletserver.log.LogSorter;
-import org.apache.accumulo.server.tabletserver.log.LoggerStrategy;
 import org.apache.accumulo.server.tabletserver.log.MutationReceiver;
-import org.apache.accumulo.server.tabletserver.log.RoundRobinLoggerStrategy;
 import org.apache.accumulo.server.tabletserver.log.TabletServerLogger;
 import org.apache.accumulo.server.tabletserver.mastermessage.MasterMessage;
 import org.apache.accumulo.server.tabletserver.mastermessage.SplitReportMessage;
@@ -195,7 +191,6 @@ import org.apache.accumulo.server.zookee
 import org.apache.accumulo.server.zookeeper.ZooLock.LockWatcher;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.accumulo.start.Platform;
-import org.apache.accumulo.start.classloader.AccumuloClassLoader;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
@@ -221,12 +216,10 @@ public class TabletServer extends Abstra
   private static HashMap<String,Long> prevGcTime = new HashMap<String,Long>();
   private static long lastMemorySize = 0;
   private static long gcTimeIncreasedCount;
-  private static final Class<? extends LoggerStrategy> DEFAULT_LOGGER_STRATEGY = RoundRobinLoggerStrategy.class;
   
   private static final long MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS = 1000;
   
   private TabletServerLogger logger;
-  private LoggerStrategy loggerStrategy;
   
   protected TabletServerMinCMetrics mincMetrics = new TabletServerMinCMetrics();
   
@@ -1984,12 +1977,6 @@ public class TabletServer extends Abstra
       return statsKeeper.getTabletStats();
     }
     
-    @Override
-    public void useLoggers(TInfo tinfo, AuthInfo credentials, Set<String> loggers)
throws TException {
-      loggerStrategy.preferLoggers(loggers);
-    }
-    
-    @Override
     public List<ActiveScan> getActiveScans(TInfo tinfo, AuthInfo credentials) throws
ThriftSecurityException, TException {
       
       try {
@@ -2081,8 +2068,10 @@ public class TabletServer extends Abstra
      * org.apache.accumulo.core.security.thrift.AuthInfo, java.util.List)
      */
     @Override
-    public void removeLogs(TInfo tinfo, AuthInfo credentials, List<String> filenames)
throws ThriftSecurityException, TException {
-      Path logDir = new Path(Constants.getWalDirectory(acuConf), getClientAddressString());
+    public void removeLogs(TInfo tinfo, AuthInfo credentials, List<String> filenames)
throws TException {
+      String myname = getClientAddressString();
+      myname = myname.replace(':', '+');
+      Path logDir = new Path(Constants.getWalDirectory(acuConf), myname);
       Set<String> loggers = new HashSet<String>();
       logger.getLoggers(loggers);
       nextFile:
@@ -2565,7 +2554,6 @@ public class TabletServer extends Abstra
   
   private FileSystem fs;
   private Instance instance;
-  private ZooCache cache;
   
   private SortedMap<KeyExtent,Tablet> onlineTablets = Collections.synchronizedSortedMap(new
TreeMap<KeyExtent,Tablet>());
   private SortedSet<KeyExtent> unopenedTablets = Collections.synchronizedSortedSet(new
TreeSet<KeyExtent>());
@@ -2598,27 +2586,6 @@ public class TabletServer extends Abstra
     return statsKeeper;
   }
   
-  public Set<String> getLoggers() throws TException, MasterNotRunningException, ThriftSecurityException
{
-    Set<String> allLoggers = new HashSet<String>();
-    String dir = ZooUtil.getRoot(instance) + Constants.ZLOGGERS;
-    for (String child : cache.getChildren(dir)) {
-      allLoggers.add(new String(cache.get(dir + "/" + child)));
-    }
-    if (allLoggers.isEmpty()) {
-      log.warn("there are no loggers registered in zookeeper");
-      return allLoggers;
-    }
-    Set<String> result = loggerStrategy.getLoggers(Collections.unmodifiableSet(allLoggers));
-    Set<String> bogus = new HashSet<String>(result);
-    bogus.removeAll(allLoggers);
-    if (!bogus.isEmpty())
-      log.warn("logger strategy is returning loggers that are not candidates");
-    result.removeAll(bogus);
-    if (result.isEmpty())
-      log.warn("strategy returned no useful loggers");
-    return result;
-  }
-  
   public void addLoggersToMetadata(List<IRemoteLogger> logs, KeyExtent extent, int
id) {
     log.info("Adding " + logs.size() + " logs for extent " + extent + " as alias " + id);
     
@@ -2635,7 +2602,7 @@ public class TabletServer extends Abstra
     entry.logSet = logSet;
     MetadataTable.addLogEntry(SecurityConstants.getSystemCredentials(), entry, getLock());
   }
-  
+
   private int startServer(AccumuloConfiguration conf, Property portHint, TProcessor processor,
String threadName) throws UnknownHostException {
     ServerPort sp = TServerUtils.startServer(conf, portHint, processor, this.getClass().getSimpleName(),
threadName, Property.TSERV_PORTSEARCH,
         Property.TSERV_MINTHREADS, Property.TSERV_THREADCHECK);
@@ -3058,31 +3025,6 @@ public class TabletServer extends Abstra
     majorCompactorThread = new Daemon(new LoggingRunnable(log, new MajorCompactor()));
     majorCompactorThread.setName("Split/MajC initiator");
     majorCompactorThread.start();
-    
-    String className = getSystemConfiguration().get(Property.TSERV_LOGGER_STRATEGY);
-    Class<? extends LoggerStrategy> klass = DEFAULT_LOGGER_STRATEGY;
-    try {
-      klass = AccumuloClassLoader.loadClass(className, LoggerStrategy.class);
-    } catch (Exception ex) {
-      log.warn("Unable to load class " + className + " for logger strategy, using " + klass.getName(),
ex);
-    }
-    try {
-      Constructor<? extends LoggerStrategy> constructor = klass.getConstructor(TabletServer.class);
-      loggerStrategy = constructor.newInstance(this);
-      loggerStrategy.init(serverConfig);
-    } catch (Exception ex) {
-      log.warn("Unable to create object of type " + klass.getName() + " using " + DEFAULT_LOGGER_STRATEGY.getName());
-    }
-    if (loggerStrategy == null) {
-      try {
-        loggerStrategy = DEFAULT_LOGGER_STRATEGY.getConstructor(TabletServer.class).newInstance(this);
-      } catch (Exception ex) {
-        log.fatal("Programmer error: cannot create a logger strategy.");
-        throw new RuntimeException(ex);
-      }
-    }
-    cache = new ZooCache();
-    
   }
   
   public TabletServerStatus getStats(Map<String,MapCounter<ScanRunState>> scanCounts)
{
@@ -3163,12 +3105,10 @@ public class TabletServer extends Abstra
     result.name = getClientAddressString();
     result.holdTime = resourceManager.holdTime();
     result.lookups = seekCount.get();
-    result.loggers = new HashSet<String>();
     result.indexCacheHits = resourceManager.getIndexCache().getStats().getHitCount();
     result.indexCacheRequest = resourceManager.getIndexCache().getStats().getRequestCount();
     result.dataCacheHits = resourceManager.getDataCache().getStats().getHitCount();
     result.dataCacheRequest = resourceManager.getDataCache().getStats().getRequestCount();
-    logger.getLoggers(result.loggers);
     return result;
   }
   
@@ -3197,34 +3137,36 @@ public class TabletServer extends Abstra
   public static void recoverLocalWriteAheadLogs(FileSystem fs, ServerConfiguration serverConf)
throws IOException {
     FileSystem localfs = FileSystem.getLocal(fs.getConf()).getRawFileSystem();
     AccumuloConfiguration conf = serverConf.getConfiguration();
-    String localWalDirectory = conf.get(Property.LOGGER_DIR);
-    for (FileStatus file : localfs.listStatus(new Path(localWalDirectory))) {
-      String name = file.getPath().getName();
-      try {
-        UUID.fromString(name);
-      } catch (IllegalArgumentException ex) {
-        log.info("Ignoring non-log file " + name + " in " + localWalDirectory);
-        continue;
-      }
-      LogFileKey key = new LogFileKey();
-      LogFileValue value = new LogFileValue();
-      log.info("Openning local log " + file.getPath());
-      Reader reader = new SequenceFile.Reader(localfs, file.getPath(), localfs.getConf());
-      Path tmp = new Path(Constants.getWalDirectory(conf) + "/" + name + ".copy");
-      FSDataOutputStream writer = fs.create(tmp);
-      while (reader.next(key, value)) {
+    String localWalDirectories = conf.get(Property.LOGGER_DIR);
+    for (String localWalDirectory : localWalDirectories.split(",")) {
+      for (FileStatus file : localfs.listStatus(new Path(localWalDirectory))) {
+        String name = file.getPath().getName();
         try {
-          key.write(writer);
-          value.write(writer);
-        } catch (EOFException ex) {
-          break;
+          UUID.fromString(name);
+        } catch (IllegalArgumentException ex) {
+          log.info("Ignoring non-log file " + name + " in " + localWalDirectory);
+          continue;
+        }
+        LogFileKey key = new LogFileKey();
+        LogFileValue value = new LogFileValue();
+        log.info("Openning local log " + file.getPath());
+        Reader reader = new SequenceFile.Reader(localfs, file.getPath(), localfs.getConf());
+        Path tmp = new Path(Constants.getWalDirectory(conf) + "/" + name + ".copy");
+        FSDataOutputStream writer = fs.create(tmp);
+        while (reader.next(key, value)) {
+          try {
+            key.write(writer);
+            value.write(writer);
+          } catch (EOFException ex) {
+            break;
+          }
         }
+        writer.close();
+        reader.close();
+        fs.rename(tmp, new Path(tmp.getParent(), name));
+        log.info("Copied local log " + name);
+        localfs.delete(new Path(localWalDirectory, name), true);
       }
-      writer.close();
-      reader.close();
-      fs.rename(tmp, new Path(tmp.getParent(), name));
-      log.info("Copied local log " + name);
-      localfs.delete(new Path(localWalDirectory, name), true);
     }
   }
 

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
Fri May 25 18:59:59 2012
@@ -194,8 +194,9 @@ public class DfsLogger implements IRemot
     this.conf = conf;
   }
   
-  public DfsLogger(ServerConfig conf, String filename) throws IOException {
+  public DfsLogger(ServerConfig conf, String logger, String filename) throws IOException
{
     this.conf = conf;
+    this.logger = logger;
     this.logPath = new Path(Constants.getWalDirectory(conf.getConfiguration()), filename);
   }
 

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/TabletServerLogger.java
Fri May 25 18:59:59 2012
@@ -209,7 +209,7 @@ public class TabletServerLogger {
         try {
           logger.close();
         } catch (Throwable ex) {
-          log.error("Unable to cleanly close logger " + logger.getLogger() + ": " + ex);
+          log.error("Unable to cleanly close log " + logger.getFileName() + ": " + ex);
         }
       }
       loggers.clear();

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/GetMasterStats.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/GetMasterStats.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/GetMasterStats.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/GetMasterStats.java
Fri May 25 18:59:59 2012
@@ -90,9 +90,6 @@ public class GetMasterStats {
         out(2, "Time Difference %.1f", ((now - server.lastContact) / 1000.));
         out(2, "Total Records %d", summary.recs);
         out(2, "Lookups %d", server.lookups);
-        out(2, "Loggers %d", server.loggers.size());
-        for (String logger : server.loggers)
-          out(3, "Logger %s", logger);
         if (server.holdTime > 0)
           out(2, "Hold Time %d", server.holdTime);
         if (server.tableMap != null && server.tableMap.size() > 0) {

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java
Fri May 25 18:59:59 2012
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.accumulo.cloudtrace.thrift.TInfo;
 import org.apache.accumulo.core.client.Instance;
@@ -164,9 +163,6 @@ public class NullTserver {
     public void unloadTablet(TInfo tinfo, AuthInfo credentials, String lock, TKeyExtent extent,
boolean save) throws TException {}
     
     @Override
-    public void useLoggers(TInfo tinfo, AuthInfo credentials, Set<String> loggers)
throws TException {}
-    
-    @Override
     public List<ActiveScan> getActiveScans(TInfo tinfo, AuthInfo credentials) throws
ThriftSecurityException, TException {
       return new ArrayList<ActiveScan>();
     }
@@ -207,7 +203,7 @@ public class NullTserver {
      * org.apache.accumulo.core.security.thrift.AuthInfo, java.util.List)
      */
     @Override
-    public void removeLogs(TInfo tinfo, AuthInfo credentials, List<String> filenames)
throws ThriftSecurityException, TException {
+    public void removeLogs(TInfo tinfo, AuthInfo credentials, List<String> filenames)
throws TException {
     }
   }
   

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/AddressUtil.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/AddressUtil.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/AddressUtil.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/AddressUtil.java
Fri May 25 18:59:59 2012
@@ -23,7 +23,7 @@ import org.apache.accumulo.server.conf.S
 
 public class AddressUtil {
   static public InetSocketAddress parseAddress(String address, Property portDefaultProperty)
{
-    final int dfaultPort = ServerConfiguration.getDefaultConfiguration().getPort(Property.TSERV_CLIENTPORT);
+    final int dfaultPort = ServerConfiguration.getDefaultConfiguration().getPort(portDefaultProperty);
     return org.apache.accumulo.core.util.AddressUtil.parseAddress(address, dfaultPort);
   }
   

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/Initialize.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
Fri May 25 18:59:59 2012
@@ -353,7 +353,6 @@ public class Initialize {
     zoo.putPersistentData(zkInstanceRoot + Constants.ZPROBLEMS, new byte[0], NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZROOT_TABLET, new byte[0], NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZROOT_TABLET_WALOGS, new byte[0], NodeExistsPolicy.FAIL);
-    zoo.putPersistentData(zkInstanceRoot + Constants.ZLOGGERS, new byte[0], NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZTRACERS, new byte[0], NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTERS, new byte[0], NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_LOCK, new byte[0], NodeExistsPolicy.FAIL);

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
Fri May 25 18:59:59 2012
@@ -41,7 +41,6 @@ public class ZooZap {
     
     boolean zapMaster = false;
     boolean zapTservers = false;
-    boolean zapLoggers = false;
     boolean zapTracers = false;
     
     if (args.length == 0) {
@@ -54,8 +53,6 @@ public class ZooZap {
         zapTservers = true;
       } else if (args[i].equals("-master")) {
         zapMaster = true;
-      } else if (args[i].equals("-loggers")) {
-        zapLoggers = true;
       } else if (args[i].equals("-tracers")) {
         zapTracers = true;
       } else if (args[i].equals("-verbose")) {
@@ -98,24 +95,19 @@ public class ZooZap {
       }
     }
     
-    if (zapLoggers) {
-      String loggersPath = Constants.ZROOT + "/" + iid + Constants.ZLOGGERS;
-      zapDirectory(zoo, loggersPath);
-    }
-    
     if (zapTracers) {
-      String loggersPath = Constants.ZROOT + "/" + iid + Constants.ZTRACERS;
-      zapDirectory(zoo, loggersPath);
+      String path = Constants.ZROOT + "/" + iid + Constants.ZTRACERS;
+      zapDirectory(zoo, path);
     }
     
   }
   
-  private static void zapDirectory(IZooReaderWriter zoo, String loggersPath) {
+  private static void zapDirectory(IZooReaderWriter zoo, String path) {
     try {
-      List<String> children = zoo.getChildren(loggersPath);
+      List<String> children = zoo.getChildren(path);
       for (String child : children) {
-        message("Deleting " + loggersPath + "/" + child + " from zookeeper");
-        zoo.recursiveDelete(loggersPath + "/" + child, NodeMissingPolicy.SKIP);
+        message("Deleting " + path + "/" + child + " from zookeeper");
+        zoo.recursiveDelete(path + "/" + child, NodeMissingPolicy.SKIP);
       }
     } catch (Exception e) {
       e.printStackTrace();

Modified: accumulo/branches/ACCUMULO-578/start/src/main/java/org/apache/accumulo/start/Main.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/start/src/main/java/org/apache/accumulo/start/Main.java?rev=1342773&r1=1342772&r2=1342773&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/start/src/main/java/org/apache/accumulo/start/Main.java
(original)
+++ accumulo/branches/ACCUMULO-578/start/src/main/java/org/apache/accumulo/start/Main.java
Fri May 25 18:59:59 2012
@@ -52,8 +52,6 @@ public class Main {
         runTMP = AccumuloClassLoader.loadClass("org.apache.accumulo.server.gc.SimpleGarbageCollector");
       } else if (args[0].equals("monitor")) {
         runTMP = AccumuloClassLoader.loadClass("org.apache.accumulo.server.monitor.Monitor");
-      } else if (args[0].equals("logger")) {
-        runTMP = AccumuloClassLoader.loadClass("org.apache.accumulo.server.logger.LogService");
       } else if (args[0].equals("tracer")) {
         runTMP = AccumuloClassLoader.loadClass("org.apache.accumulo.server.trace.TraceServer");
       } else if (args[0].equals("classpath")) {



Mime
View raw message