accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1342276 [2/2] - 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 Thu, 24 May 2012 14:08:32 GMT
Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/IRemoteLogger.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/IRemoteLogger.java?rev=1342276&r1=1342275&r2=1342276&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/IRemoteLogger.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/IRemoteLogger.java
Thu May 24 14:08:30 2012
@@ -21,13 +21,8 @@ import java.util.List;
 
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Mutation;
-import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
-import org.apache.accumulo.core.tabletserver.thrift.LogCopyInfo;
-import org.apache.accumulo.core.tabletserver.thrift.LoggerClosedException;
-import org.apache.accumulo.core.tabletserver.thrift.NoSuchLogIDException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletMutations;
-import org.apache.accumulo.server.tabletserver.log.RemoteLogger.LoggerOperation;
-import org.apache.thrift.TException;
+import org.apache.accumulo.server.tabletserver.log.DfsLogger.LoggerOperation;
 
 /**
  * 
@@ -44,23 +39,23 @@ public interface IRemoteLogger {
   
   public abstract String getFileName();
   
-  public abstract void close() throws NoSuchLogIDException, LoggerClosedException, TException;
+  public abstract void close() throws IOException;
   
-  public abstract void defineTablet(int seq, int tid, KeyExtent tablet) throws NoSuchLogIDException,
LoggerClosedException, TException;
+  public abstract void defineTablet(int seq, int tid, KeyExtent tablet) throws IOException;
   
-  public abstract LoggerOperation log(int seq, int tid, Mutation mutation) throws NoSuchLogIDException,
LoggerClosedException, TException;
+  public abstract LoggerOperation log(int seq, int tid, Mutation mutation) throws IOException;
   
-  public abstract LoggerOperation logManyTablets(List<TabletMutations> mutations) throws
NoSuchLogIDException, LoggerClosedException, TException;
+  public abstract LoggerOperation logManyTablets(List<TabletMutations> mutations) throws
IOException;
   
-  public abstract void minorCompactionFinished(int seq, int tid, String fqfn) throws NoSuchLogIDException,
LoggerClosedException, TException;
+  public abstract void minorCompactionFinished(int seq, int tid, String fqfn) throws IOException;
   
-  public abstract void minorCompactionStarted(int seq, int tid, String fqfn) throws NoSuchLogIDException,
LoggerClosedException, TException;
+  public abstract void minorCompactionStarted(int seq, int tid, String fqfn) throws IOException;
   
-  public abstract LogCopyInfo startCopy(String name, String fullyQualifiedFileName) throws
ThriftSecurityException, TException;
+  public abstract double startCopy(String name, String fullyQualifiedFileName) throws IOException;
   
-  public abstract List<String> getClosedLogs() throws ThriftSecurityException, TException;
+  public abstract List<String> getClosedLogs() throws IOException;
   
-  public abstract void removeFile(List<String> files) throws ThriftSecurityException,
TException;
+  public abstract void removeFile(List<String> files) throws IOException;
   
   public abstract void open() throws IOException;
 

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=1342276&r1=1342275&r2=1342276&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
Thu May 24 14:08:30 2012
@@ -34,13 +34,12 @@ import org.apache.accumulo.core.conf.Pro
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.thrift.TMutation;
-import org.apache.accumulo.core.tabletserver.thrift.LoggerClosedException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletMutations;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.server.tabletserver.Tablet;
 import org.apache.accumulo.server.tabletserver.Tablet.CommitSession;
 import org.apache.accumulo.server.tabletserver.TabletServer;
-import org.apache.accumulo.server.tabletserver.log.RemoteLogger.LoggerOperation;
+import org.apache.accumulo.server.tabletserver.log.DfsLogger.LoggerOperation;
 import org.apache.log4j.Logger;
 
 /**
@@ -182,35 +181,9 @@ public class TabletServerLogger {
     }
     
     try {
-      if (tserver.getSystemConfiguration().getBoolean(Property.TSERV_USE_DFS_WAL)) {
-        DfsLogger alog = new DfsLogger(tserver.getServerConfig());
-        alog.open();
-        loggers.add(alog);
-      } else {
-        while (true) {
-          Set<String> loggerAddresses = tserver.getLoggers();
-          if (!loggerAddresses.isEmpty()) {
-            for (String logger : loggerAddresses) {
-              try {
-                RemoteLogger alog = new RemoteLogger(logger, tserver.getSystemConfiguration());
-                alog.open();
-                loggers.add(alog);
-              } catch (LoggerClosedException t) {
-                close();
-                break;
-              } catch (Exception t) {
-                close();
-                log.warn("Unable to connect to " + logger + ": " + t);
-                break;
-              }
-            }
-            
-            if (loggers.size() == loggerAddresses.size())
-              break;
-            UtilWaitThread.sleep(1000);
-          }
-        }
-      }
+      DfsLogger alog = new DfsLogger(tserver.getServerConfig());
+      alog.open();
+      loggers.add(alog);
       logSetId.incrementAndGet();
       return;
     } catch (Exception t) {
@@ -235,8 +208,6 @@ public class TabletServerLogger {
       for (IRemoteLogger logger : loggers) {
         try {
           logger.close();
-        } catch (LoggerClosedException ex) {
-          // expected
         } catch (Throwable ex) {
           log.error("Unable to cleanly close logger " + logger.getLogger() + ": " + ex);
         }

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/functional/RunTests.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/functional/RunTests.java?rev=1342276&r1=1342275&r2=1342276&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/functional/RunTests.java
(original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/test/functional/RunTests.java
Thu May 24 14:08:30 2012
@@ -22,7 +22,6 @@ import java.io.InputStream;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.accumulo.server.logger.IdentityReducer;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.hadoop.fs.FileSystem;
@@ -135,7 +134,7 @@ public class RunTests extends Configured
     job.setOutputValueClass(Text.class);
     
     // don't do anything with the results (yet) a summary would be nice
-    job.setReducerClass(IdentityReducer.class);
+    job.setNumReduceTasks(0);
     
     // submit the job
     log.info("Starting tests");



Mime
View raw message