accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [8/8] accumulo git commit: Merge branch '1.7'
Date Sat, 18 Jul 2015 00:08:03 GMT
Merge branch '1.7'


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4f3d58d0
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4f3d58d0
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4f3d58d0

Branch: refs/heads/master
Commit: 4f3d58d0d66791e290ffad3f76bd5990daa23b5f
Parents: 7ec6291 e8df6f0
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Fri Jul 17 20:07:19 2015 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Fri Jul 17 20:07:19 2015 -0400

----------------------------------------------------------------------
 .../accumulo/core/client/mapreduce/RangeInputSplit.java |  2 +-
 .../java/org/apache/accumulo/core/conf/Property.java    |  5 +++++
 .../core/client/mapreduce/AccumuloInputFormatTest.java  | 12 +++++-------
 .../java/org/apache/accumulo/tserver/TabletServer.java  |  8 +++++---
 .../apache/accumulo/tserver/log/TabletServerLogger.java | 12 +++++++-----
 .../java/org/apache/accumulo/shell/ShellConfigTest.java | 10 +++++-----
 6 files changed, 28 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f3d58d0/core/src/main/java/org/apache/accumulo/core/conf/Property.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f3d58d0/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f3d58d0/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
----------------------------------------------------------------------
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
index e6d7185,a1921c2..386de35
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
@@@ -151,17 -144,20 +151,19 @@@ public class TabletServerLogger 
      this.maxSize = maxSize;
      this.syncCounter = syncCounter;
      this.flushCounter = flushCounter;
+     this.toleratedFailures = toleratedWalCreationFailures;
+     this.walErrors = CacheBuilder.newBuilder().maximumSize(toleratedFailures).expireAfterWrite(toleratedFailuresPeriodMillis,
TimeUnit.MILLISECONDS).build();
    }
  
 -  private int initializeLoggers(final List<DfsLogger> copy) throws IOException {
 -    final int[] result = {-1};
 -    testLockAndRun(logSetLock, new TestCallWithWriteLock() {
 +  private DfsLogger initializeLoggers(final AtomicInteger logIdOut) throws IOException {
 +    final AtomicReference<DfsLogger> result = new AtomicReference<DfsLogger>();
 +    testLockAndRun(logIdLock, new TestCallWithWriteLock() {
        @Override
        boolean test() {
 -        copy.clear();
 -        copy.addAll(loggers);
 -        if (!loggers.isEmpty())
 -          result[0] = logSetId.get();
 -        return loggers.isEmpty();
 +        result.set(currentLog);
 +        if (currentLog != null)
 +          logIdOut.set(logId.get());
 +        return currentLog == null;
        }
  
        @Override
@@@ -208,22 -199,14 +210,22 @@@
      }
  
      try {
 -      DfsLogger alog = new DfsLogger(tserver.getServerConfig(), syncCounter, flushCounter);
 -      alog.open(tserver.getClientAddressString());
 -      loggers.add(alog);
 -      logSetId.incrementAndGet();
 -      return;
 +      startLogMaker();
 +      Object next = nextLog.take();
 +      if (next instanceof Exception) {
 +        throw (Exception) next;
 +      }
 +      if (next instanceof DfsLogger) {
 +        currentLog = (DfsLogger) next;
 +        logId.incrementAndGet();
 +        log.info("Using next log " + currentLog.getFileName());
 +        return;
 +      } else {
 +        throw new RuntimeException("Error: unexpected type seen: " + next);
 +      }
      } catch (Exception t) {
        walErrors.put(System.currentTimeMillis(), "");
-       if (walErrors.size() >= HALT_AFTER_ERROR_COUNT) {
+       if (walErrors.size() > toleratedFailures) {
          Halt.halt("Experienced too many errors creating WALs, giving up");
        }
        throw new RuntimeException(t);


Mime
View raw message