accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [2/2] accumulo git commit: Merge branch '1.7'
Date Mon, 14 Mar 2016 23:00:13 GMT
Merge branch '1.7'

Conflicts:
	server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
	server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
	server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java


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

Branch: refs/heads/master
Commit: 0f2f80d973585dbf5b1a2dc0544420bdbdc03335
Parents: db21315 37857c5
Author: Keith Turner <kturner@apache.org>
Authored: Mon Mar 14 18:46:37 2016 -0400
Committer: Keith Turner <kturner@apache.org>
Committed: Mon Mar 14 18:46:37 2016 -0400

----------------------------------------------------------------------
 .../apache/accumulo/tserver/TabletServer.java   | 17 ++++++++++++--
 .../apache/accumulo/tserver/log/DfsLogger.java  | 24 ++++++++++++++++----
 .../tserver/log/TabletServerLogger.java         | 18 +++++++--------
 3 files changed, 43 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0f2f80d9/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index b854a53,71ad6bc..d19dfa9
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@@ -2940,10 -2966,21 +2940,22 @@@ public class TabletServer extends Accum
      }
    }
  
+   private Durability getMincEventDurability(KeyExtent extent) {
+     TableConfiguration conf;
+     if (extent.isMeta()) {
+       conf = confFactory.getTableConfiguration(RootTable.ID);
+     } else {
+       conf = confFactory.getTableConfiguration(MetadataTable.ID);
+     }
+     Durability durability = DurabilityImpl.fromString(conf.get(Property.TABLE_DURABILITY));
+     return durability;
+   }
+ 
    public void minorCompactionFinished(CommitSession tablet, String newDatafile, int walogSeq)
throws IOException {
+     Durability durability = getMincEventDurability(tablet.getExtent());
      totalMinorCompactions.incrementAndGet();
-     logger.minorCompactionFinished(tablet, newDatafile, walogSeq);
+     logger.minorCompactionFinished(tablet, newDatafile, walogSeq, durability);
 +    markUnusedWALs();
    }
  
    public void minorCompactionStarted(CommitSession tablet, int lastUpdateSequence, String
newMapfileLocation) throws IOException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0f2f80d9/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0f2f80d9/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 04f4e50,11585f2..b76b9cd
--- 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
@@@ -398,13 -316,17 +398,11 @@@ public class TabletServerLogger 
            seq = seqGen.incrementAndGet();
            if (seq < 0)
              throw new RuntimeException("Logger sequence generator wrapped!  Onos!!!11!eleven");
 -          ArrayList<LoggerOperation> queuedOperations = new ArrayList<LoggerOperation>(copy.size());
 -          for (DfsLogger wal : copy) {
 -            queuedOperations.add(writer.write(wal, seq));
 -          }
 -
 -          for (LoggerOperation lop : queuedOperations) {
 -            lop.await();
 -          }
 +          LoggerOperation lop = writer.write(copy, seq);
-           if (lop != null) {
-             lop.await();
-           }
++          lop.await();
  
            // double-check: did the log set change?
 -          success = (currentLogSet == logSetId.get());
 +          success = (currentLogId == logId.get());
          }
        } catch (DfsLogger.LogClosedException ex) {
          log.debug("Logs closed while writing, retrying " + attempt);
@@@ -526,7 -449,8 +525,7 @@@
      int seq = write(commitSession, true, new Writer() {
        @Override
        public LoggerOperation write(DfsLogger logger, int ignored) throws Exception {
-         return logger.minorCompactionFinished(walogSeq, commitSession.getLogId(), fullyQualifiedFileName);
 -        logger.minorCompactionFinished(walogSeq, commitSession.getLogId(), fullyQualifiedFileName,
durability).await();
 -        return DfsLogger.NO_WAIT_LOGGER_OP;
++        return logger.minorCompactionFinished(walogSeq, commitSession.getLogId(), fullyQualifiedFileName,
durability);
        }
      });
  
@@@ -539,7 -464,8 +539,7 @@@
      write(commitSession, false, new Writer() {
        @Override
        public LoggerOperation write(DfsLogger logger, int ignored) throws Exception {
-         return logger.minorCompactionStarted(seq, commitSession.getLogId(), fullyQualifiedFileName);
 -        logger.minorCompactionStarted(seq, commitSession.getLogId(), fullyQualifiedFileName,
durability).await();
 -        return DfsLogger.NO_WAIT_LOGGER_OP;
++        return logger.minorCompactionStarted(seq, commitSession.getLogId(), fullyQualifiedFileName,
durability);
        }
      });
      return seq;


Mime
View raw message