accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [09/18] accumulo git commit: ACCUMULO-4428 Changes for the backport to 1.6
Date Sat, 03 Sep 2016 22:04:36 GMT
ACCUMULO-4428 Changes for the backport to 1.6

JDK6 and internal API changes


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

Branch: refs/heads/1.6
Commit: 768a73c504d817ee9697dd249987d0f29189190c
Parents: b0181fe
Author: Josh Elser <elserj@apache.org>
Authored: Sat Sep 3 18:03:17 2016 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sat Sep 3 18:03:17 2016 -0400

----------------------------------------------------------------------
 .../apache/accumulo/gc/SimpleGarbageCollector.java |  2 +-
 .../gc/GarbageCollectWriteAheadLogsTest.java       |  4 ++--
 .../test/functional/GarbageCollectorIT.java        | 17 +++++++++--------
 3 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/768a73c5/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
index 36ca17a..8e411b0 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
@@ -537,7 +537,7 @@ public class SimpleGarbageCollector implements Iface {
     Sampler sampler = new CountSampler(100);
 
     // Map of tserver -> timestamp, used by the GCWriteAheadLogs to track state of when
a tablet server went down
-    final Map<HostAndPort,Long> firstSeenDead = new HashMap<>();
+    final Map<HostAndPort,Long> firstSeenDead = new HashMap<HostAndPort,Long>();
 
     while (true) {
       if (sampler.next())

http://git-wip-us.apache.org/repos/asf/accumulo/blob/768a73c5/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogsTest.java
----------------------------------------------------------------------
diff --git a/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogsTest.java
b/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogsTest.java
index 24efa09..d31d4df 100644
--- a/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogsTest.java
+++ b/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogsTest.java
@@ -83,7 +83,7 @@ public class GarbageCollectWriteAheadLogsTest {
   public void setUp() throws Exception {
     instance = createMock(Instance.class);
     volMgr = createMock(VolumeManager.class);
-    firstSeenDead = new HashMap<>();
+    firstSeenDead = new HashMap<HostAndPort,Long>();
     gcwal = new GarbageCollectWriteAheadLogs(instance, volMgr, false, firstSeenDead);
     modTime = System.currentTimeMillis();
   }
@@ -475,7 +475,7 @@ public class GarbageCollectWriteAheadLogsTest {
   class GCWALDeadTserverCollectMock extends GarbageCollectWriteAheadLogs {
 
     public GCWALDeadTserverCollectMock(Instance i, VolumeManager vm, boolean useTrash, Map<HostAndPort,Long>
firstSeenDead) throws IOException {
-      super(ctx, vm, useTrash, firstSeenDead);
+      super(i, vm, useTrash, firstSeenDead);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/768a73c5/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
index 475529b..98d2c8a 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
@@ -29,6 +29,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import org.apache.accumulo.cluster.ClusterServerType;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.BatchWriterOpts;
 import org.apache.accumulo.core.cli.ScannerOpts;
@@ -91,7 +92,7 @@ public class GarbageCollectorIT extends ConfigurableMacIT {
     settings.put(Property.GC_CYCLE_START.getKey(), "1");
     settings.put(Property.GC_CYCLE_DELAY.getKey(), "1");
     settings.put(Property.GC_PORT.getKey(), "0");
-    settings.put(Property.GC_WAL_DEAD_SERVER_WAIT, "1s");
+    settings.put(Property.GC_WAL_DEAD_SERVER_WAIT.getKey(), "1s");
     settings.put(Property.TSERV_MAXMEM.getKey(), "5K");
     settings.put(Property.TSERV_MAJC_DELAY.getKey(), "1");
     cfg.setSiteConfig(settings);
@@ -102,7 +103,7 @@ public class GarbageCollectorIT extends ConfigurableMacIT {
 
   private void killMacGc() throws ProcessNotFoundException, InterruptedException, KeeperException,
IOException {
     // kill gc started by MAC
-    getCluster().getClusterControl().stop(ServerType.GARBAGE_COLLECTOR);
+    getCluster().getClusterControl().stop(ClusterServerType.GARBAGE_COLLECTOR);
     // delete lock in zookeeper if there, this will allow next GC to start quickly
     String path = ZooUtil.getRoot(new ZooKeeperInstance(getCluster().getClientConfig()))
+ Constants.ZGC_LOCK;
     ZooReaderWriter zk = new ZooReaderWriter(cluster.getZooKeepers(), 30000, OUR_SECRET);
@@ -158,8 +159,8 @@ public class GarbageCollectorIT extends ConfigurableMacIT {
     VerifyIngest.Opts vopts = new VerifyIngest.Opts();
     vopts.rows = opts.rows = 10000;
     vopts.cols = opts.cols = 1;
-    opts.setPrincipal("root");
-    vopts.setPrincipal("root");
+    opts.principal = "root";
+    vopts.principal = "root";
     TestIngest.ingest(c, opts, new BatchWriterOpts());
 
     // Test WAL log has been created
@@ -171,15 +172,15 @@ public class GarbageCollectorIT extends ConfigurableMacIT {
     Assert.assertEquals("WAL file does not exist", true, walToBeDeleted.exists());
 
     // Kill TServers and give it some time to die
-    getCluster().getClusterControl().stop(ServerType.TABLET_SERVER);
+    getCluster().getClusterControl().stop(ClusterServerType.TABLET_SERVER);
     UtilWaitThread.sleep(5000);
     // Restart them or the GC won't ever be able to run a cycle
-    getCluster().getClusterControl().start(ServerType.TABLET_SERVER);
+    getCluster().getClusterControl().start(ClusterServerType.TABLET_SERVER);
 
     // Restart GC and let it run
-    getCluster().getClusterControl().start(ServerType.GARBAGE_COLLECTOR);
+    getCluster().getClusterControl().start(ClusterServerType.GARBAGE_COLLECTOR);
 
-    log.info("Waiting for garbage collector to delete the WAL {}", walToBeDeleted);
+    log.info("Waiting for garbage collector to delete the WAL " + walToBeDeleted);
     while (walToBeDeleted.exists()) {
       // Wait for the file to be deleted
       Thread.sleep(2000);


Mime
View raw message