accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] accumulo git commit: ACCUMULO-4112 use the least durable write for MinC flags in the WALog
Date Wed, 20 Jan 2016 16:37:07 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master e59649bff -> a12b3741a


ACCUMULO-4112 use the least durable write for MinC flags in the WALog


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

Branch: refs/heads/master
Commit: 497a884c9da50c6c3620816a0e1fd5321ca6eaed
Parents: 1255574
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Wed Jan 20 11:35:56 2016 -0500
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Wed Jan 20 11:35:56 2016 -0500

----------------------------------------------------------------------
 .../apache/accumulo/server/util/MetadataTableUtil.java    |  4 ++--
 .../java/org/apache/accumulo/tserver/log/DfsLogger.java   |  4 ++--
 .../apache/accumulo/tserver/log/TabletServerLogger.java   | 10 ++++------
 3 files changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/497a884c/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
index d4ec4f8..4b88c5b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.server.util;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN;
 import static org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ServerColumnFamily.TIME_COLUMN;
@@ -96,7 +97,6 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Optional;
-import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 /**
  * provides a reference to the metadata table for updates by tablet servers
@@ -131,7 +131,7 @@ public class MetadataTableUtil {
     return rootTable;
   }
 
-  private static void putLockID(ZooLock zooLock, Mutation m) {
+  public static void putLockID(ZooLock zooLock, Mutation m) {
     TabletsSection.ServerColumnFamily.LOCK_COLUMN.put(m, new Value(zooLock.getLockID().serialize(ZooUtil.getRoot(HdfsZooInstance.getInstance())
+ "/")
         .getBytes(UTF_8)));
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/497a884c/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
index 4c388b9..aa69b1a 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
@@ -645,7 +645,7 @@ public class DfsLogger implements Comparable<DfsLogger> {
     key.event = COMPACTION_FINISH;
     key.seq = seq;
     key.tid = tid;
-    return logFileData(Collections.singletonList(new Pair<LogFileKey,LogFileValue>(key,
EMPTY)), Durability.SYNC);
+    return logFileData(Collections.singletonList(new Pair<LogFileKey,LogFileValue>(key,
EMPTY)), Durability.LOG);
   }
 
   public LoggerOperation minorCompactionStarted(int seq, int tid, String fqfn) throws IOException
{
@@ -654,7 +654,7 @@ public class DfsLogger implements Comparable<DfsLogger> {
     key.seq = seq;
     key.tid = tid;
     key.filename = fqfn;
-    return logFileData(Collections.singletonList(new Pair<LogFileKey,LogFileValue>(key,
EMPTY)), Durability.SYNC);
+    return logFileData(Collections.singletonList(new Pair<LogFileKey,LogFileValue>(key,
EMPTY)), Durability.LOG);
   }
 
   public String getLogger() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/497a884c/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
----------------------------------------------------------------------
diff --git 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
index 1102ecb..04f4e50 100644
--- 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
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.tserver.log;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -59,8 +61,6 @@ import org.apache.hadoop.fs.Path;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
-
 /**
  * Central logging facility for the TServerInfo.
  *
@@ -526,8 +526,7 @@ public class TabletServerLogger {
     int seq = write(commitSession, true, new Writer() {
       @Override
       public LoggerOperation write(DfsLogger logger, int ignored) throws Exception {
-        logger.minorCompactionFinished(walogSeq, commitSession.getLogId(), fullyQualifiedFileName).await();
-        return null;
+        return logger.minorCompactionFinished(walogSeq, commitSession.getLogId(), fullyQualifiedFileName);
       }
     });
 
@@ -540,8 +539,7 @@ public class TabletServerLogger {
     write(commitSession, false, new Writer() {
       @Override
       public LoggerOperation write(DfsLogger logger, int ignored) throws Exception {
-        logger.minorCompactionStarted(seq, commitSession.getLogId(), fullyQualifiedFileName).await();
-        return null;
+        return logger.minorCompactionStarted(seq, commitSession.getLogId(), fullyQualifiedFileName);
       }
     });
     return seq;


Mime
View raw message