accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [1/2] git commit: ACCUMULO-2163 made MAC always run GC
Date Thu, 09 Jan 2014 21:27:55 GMT
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT 1413ebcea -> d0f626d96


ACCUMULO-2163 made MAC always run GC


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 96bfa8cad75b5f41bbf9dcf4790bc6677c36dce8
Parents: 9abb725
Author: Keith Turner <kturner@apache.org>
Authored: Thu Jan 9 14:36:33 2014 -0500
Committer: Keith Turner <kturner@apache.org>
Committed: Thu Jan 9 15:47:33 2014 -0500

----------------------------------------------------------------------
 .../minicluster/MiniAccumuloCluster.java        |  8 +++---
 .../minicluster/MiniAccumuloConfig.java         | 17 ------------
 .../minicluster/MiniAccumuloClusterGCTest.java  | 27 --------------------
 3 files changed, 4 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/96bfa8ca/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
----------------------------------------------------------------------
diff --git a/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
b/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
index 7631f27..cce422c 100644
--- a/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
+++ b/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
@@ -244,7 +244,9 @@ public class MiniAccumuloCluster {
     appendProp(fileWriter, Property.TRACE_PORT, "" + PortUtils.getRandomFreePort(), siteConfig);
     appendProp(fileWriter, Property.LOGGER_SORT_BUFFER_SIZE, "50M", siteConfig);
     appendProp(fileWriter, Property.LOGGER_PORTSEARCH, "true", siteConfig);
-    appendProp(fileWriter, Property.GC_CYCLE_DELAY, "30s", siteConfig);
+    appendProp(fileWriter, Property.GC_CYCLE_DELAY, "4s", siteConfig);
+    appendProp(fileWriter, Property.GC_CYCLE_START, "0s", siteConfig);
+    appendProp(fileWriter, Property.GC_PORT, "" + PortUtils.getRandomFreePort(), siteConfig);
     
     // since there is a small amount of memory, check more frequently for majc... setting
may not be needed in 1.5
     appendProp(fileWriter, Property.TSERV_MAJC_DELAY, "3", siteConfig);
@@ -324,9 +326,7 @@ public class MiniAccumuloCluster {
     loggerProcess = exec(LogService.class);
     masterProcess = exec(Master.class);
     
-    if (config.shouldRunGC()) {
-      gcProcess = exec(SimpleGarbageCollector.class);
-    }
+    gcProcess = exec(SimpleGarbageCollector.class);
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/96bfa8ca/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
----------------------------------------------------------------------
diff --git a/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
b/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
index 1efd0d4..c9548a6 100644
--- a/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
+++ b/src/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
@@ -32,7 +32,6 @@ public class MiniAccumuloConfig {
   private String rootPassword = null;
   private Map<String,String> siteConfig = Collections.emptyMap();
   private int numTservers = 2;
-  private boolean runGC = false;
 
   /**
    * @param dir
@@ -87,20 +86,4 @@ public class MiniAccumuloConfig {
     this.siteConfig = siteConfig;
     return this;
   }
-
-  /**
-   * Whether or not the Accumulo garbage collector proces will run
-   */
-  public boolean shouldRunGC() {
-    return runGC;
-  }
-
-  /**
-   * Sets if the Accumulo garbage collector process should run
-   * 
-   * @param shouldRunGC
-   */
-  public void runGC(boolean shouldRunGC) {
-    runGC = shouldRunGC;
-  }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/96bfa8ca/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
----------------------------------------------------------------------
diff --git a/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
b/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
index c32e719..50f3f55 100644
--- a/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
+++ b/src/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterGCTest.java
@@ -32,39 +32,15 @@ import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.junit.Assert;
 import org.junit.Ignore;
-import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 import com.google.common.collect.ImmutableMap;
-import com.google.common.io.Files;
 
 /**
  * 
  */
 public class MiniAccumuloClusterGCTest {
   
-  @Test
-  public void testGcConfig() throws Exception {
-    File f = Files.createTempDir();
-    f.deleteOnExit();
-    try {
-      MiniAccumuloConfig macConfig = new MiniAccumuloConfig(f, passwd);
-      macConfig.setNumTservers(1);
-  
-      Assert.assertEquals(false, macConfig.shouldRunGC());
-      
-      // Turn on the garbage collector
-      macConfig.runGC(true);
-  
-      Assert.assertEquals(true, macConfig.shouldRunGC());
-    } finally {
-      if (null != f && f.exists()) {
-        f.delete();
-      }
-    }
-  }
-
-  
   private static TemporaryFolder tmpDir = new TemporaryFolder();
   private static MiniAccumuloConfig macConfig;
   private static MiniAccumuloCluster accumulo;
@@ -77,9 +53,6 @@ public class MiniAccumuloClusterGCTest {
     macConfig = new MiniAccumuloConfig(tmpDir.getRoot(), passwd);
     macConfig.setNumTservers(1);
     
-    // Turn on the garbage collector
-    macConfig.runGC(true);
-    
     String gcPort = Integer.toString(PortUtils.getRandomFreePort());
     
     // And tweak the settings to make it run often


Mime
View raw message