|
From: <tho...@us...> - 2014-04-15 14:16:19
|
Revision: 8122
http://sourceforge.net/p/bigdata/code/8122
Author: thompsonbry
Date: 2014-04-15 14:16:12 +0000 (Tue, 15 Apr 2014)
Log Message:
-----------
Reconciled changes in the main development branch into the HA1/HA5 branch in preparation for merge back to the main development branch. See #722 and #723.
Modified Paths:
--------------
branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/BufferedWrite.java
branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCache.java
branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java
branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/journal/AbstractJournal.java
branches/BIGDATA_MGC_HA1_HA5/bigdata/src/test/com/bigdata/io/writecache/TestWORMWriteCacheService.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3BackupTestCase.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA5JournalServerTestCase.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-D.config
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-E.config
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/StressTestHA3JournalServer.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy2.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServer.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServerWithHALogs.java
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-A.properties
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient.config
branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java
Removed Paths:
-------------
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient1.config
branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient5.config
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/BufferedWrite.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/BufferedWrite.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/BufferedWrite.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -142,7 +142,7 @@
*
* @see <a href="http://trac.bigdata.com/ticket/721#comment:10"> HA1 </a>
*/
- private final byte[] s_zeros = new byte[256];
+ static private final byte[] s_zeros = new byte[256];
/**
* Buffer a write.
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCache.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCache.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCache.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -310,7 +310,7 @@
/**
* When a record is used as a read cache then the readCount is
- * maintained as a metric on its access. ???This could be used to
+ * maintained as a metric on its access. This could be used to
* determine eviction/compaction.
* <p>
* Note: volatile to guarantee visibility of updates. Might do better
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -1165,7 +1165,7 @@
*/
if (flush) {
/*
- * Send out the full cache block. FIXME Why are we not calling sendAddressMetadata() here?
+ * Send out the full cache block.
*/
writeCacheBlock(curCompactingCache);
addClean(curCompactingCache, true/* addFirst */);
@@ -1245,6 +1245,8 @@
* @throws InterruptedException
* @throws ExecutionException
* @throws IOException
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/721"> HA1 </a>
*/
private void sendAddressMetadata(final WriteCache cache)
throws IllegalStateException, InterruptedException,
@@ -1345,19 +1347,14 @@
private void writeCacheBlock(final WriteCache cache)
throws InterruptedException, ExecutionException, IOException {
-// /*
-// * IFF HA
-// *
-// * TODO isHA should be true even if the quorum is not highly
-// * available since there still could be other services in the write
-// * pipeline (e.g., replication to an offline HAJournalServer prior
-// * to changing over into an HA3 quorum or off-site replication). The
-// * unit tests need to be updated to specify [isHighlyAvailable] for
-// * ALL quorum based test runs.
-// */
-// final boolean isHA = quorum != null && quorum.isHighlyAvailable();
-
- // IFF HA and this is the quorum leader.
+ /**
+ * IFF HA and this is the quorum leader.
+ *
+ * Note: This is true for HA1 as well. The code path enabled by this
+ * is responsible for writing the HALog files.
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/721"> HA1 </a>
+ */
final boolean isHALeader = quorum != null
&& quorum.getClient().isLeader(quorumToken);
@@ -1441,6 +1438,12 @@
*/
quorumMember.logWriteCacheBlock(pkg.getMessage(), pkg.getData().duplicate());
+ /*
+ * TODO Do we want to always support the replication code path
+ * when a quorum exists (that is, also for HA1) in case there
+ * are pipeline listeners that are not HAJournalServer
+ * instances? E.g., for offsite replication?
+ */
if (quorum.replicationFactor() > 1) {
// ASYNC MSG RMI + NIO XFER.
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/journal/AbstractJournal.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -3429,13 +3429,8 @@
return;
if (!quorum.isHighlyAvailable()) {
- // FIXME: Find the reason why this delay is needed to pass HA1 snapshot tests
-// try {
-// Thread.sleep(1000);
-// } catch (InterruptedException e) {
-// e.printStackTrace();
-// }
- return;
+ // Gather and 2-phase commit are not used in HA1.
+ return;
}
/**
@@ -3550,9 +3545,11 @@
store._commitRecord = store._getCommitRecord();
if (quorum != null) {
- /*
+ /**
* Write the root block on the HALog file, closing out that
* file.
+ *
+ * @see <a href="http://trac.bigdata.com/ticket/721"> HA1 </a>
*/
final QuorumService<HAGlue> localService = quorum.getClient();
if (localService != null) {
@@ -3872,7 +3869,7 @@
if (quorum == null || quorum.replicationFactor() == 1) {
- // Non-HA mode.
+ // Non-HA mode (including HA1).
cs.commitSimple();
} else {
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata/src/test/com/bigdata/io/writecache/TestWORMWriteCacheService.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/test/com/bigdata/io/writecache/TestWORMWriteCacheService.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata/src/test/com/bigdata/io/writecache/TestWORMWriteCacheService.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -521,7 +521,7 @@
final int nbuffers = 1;
final boolean useChecksums = false;
- final boolean isHighlyAvailable = true; // for HA1! false;
+ final boolean isHighlyAvailable = true;
// No write pipeline.
final int k = 1;
@@ -619,7 +619,7 @@
final int nbuffers = 2;
final boolean useChecksums = false;
- final boolean isHighlyAvailable = true; // for HA1! false;
+ final boolean isHighlyAvailable = true;
// No write pipeline.
final int k = 1;
@@ -672,7 +672,7 @@
*/
final double largeRecordRate = 0d;
final boolean useChecksums = false;
- final boolean isHighlyAvailable = true; // for HA1! false;
+ final boolean isHighlyAvailable = true;
// No write pipeline.
final int k = 1;
@@ -717,7 +717,7 @@
final int nbuffers = 6;
final boolean useChecksums = true;
- final boolean isHighlyAvailable = true; // for HA1! false;
+ final boolean isHighlyAvailable = true;
// No write pipeline.
final int k = 1;
@@ -770,7 +770,7 @@
*/
final double largeRecordRate = 0d;
final boolean useChecksums = true;
- final boolean isHighlyAvailable = true; // for HA1! false;
+ final boolean isHighlyAvailable = true;
// No write pipeline.
final int k = 1;
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -4574,7 +4574,7 @@
// }
- log.warn("Starting NSS from " + jettyXml);
+ log.warn("Starting NSS");
// Start the server.
jettyServer.start();
@@ -4658,9 +4658,8 @@
if (tmp == null)
throw new IllegalStateException("Server is not running");
- final int port = tmp.getConnectors()[0].getLocalPort();
- haLog.warn("Returning NSSPort: " + port);
- return port;
+ return tmp.getConnectors()[0].getLocalPort();
+
}
/**
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3BackupTestCase.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3BackupTestCase.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3BackupTestCase.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -63,6 +63,13 @@
super(name);
}
+ @Override
+ protected int replicationFactor() {
+
+ return 3;
+
+ }
+
/**
* Issue HTTP request to a service to take a snapshot.
*
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -87,7 +87,6 @@
import com.bigdata.jini.util.JiniUtil;
import com.bigdata.journal.IRootBlockView;
import com.bigdata.journal.StoreState;
-import com.bigdata.journal.jini.ha.HAJournalServer.ConfigurationOptions;
import com.bigdata.journal.jini.ha.HAJournalTest.HAGlueTest;
import com.bigdata.quorum.AbstractQuorumClient;
import com.bigdata.quorum.AsynchronousQuorumCloseException;
@@ -110,7 +109,7 @@
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
*/
-public class AbstractHA3JournalServerTestCase extends
+public abstract class AbstractHA3JournalServerTestCase extends
AbstractHAJournalServerTestCase implements DiscoveryListener {
/** Quorum client used to monitor (or act on) the logical service quorum. */
@@ -133,7 +132,7 @@
* Implementation listens for the death of the child process and can be used
* to decide when the child process is no longer executing.
*/
- public static class ServiceListener implements IServiceListener {
+ static class ServiceListener implements IServiceListener {
private volatile HAGlue haGlue;
private volatile ProcessHelper processHelper;
@@ -152,13 +151,14 @@
this.haGlue = haGlue;
}
- @SuppressWarnings("unused")
- public HAGlue getHAGlue() {
+// @SuppressWarnings("unused")
+// public HAGlue getHAGlue() {
+//
+// return haGlue;
+//
+// }
- return haGlue;
-
- }
-
+ @Override
public void add(final ProcessHelper processHelper) {
if (processHelper == null)
@@ -1378,11 +1378,33 @@
}
- protected String getZKConfigFile() {
- return "zkClient.config";
+ /**
+ * Return the zookeeper client configuration file.
+ */
+ final protected String getZKConfigFile() {
+
+ return "zkClient.config";
+
}
/**
+ * The as-configured replication factor.
+ * <p>
+ * Note: This is defined in the HAJournal.config file, which is where the
+ * {@link HAJournalServer} gets the correct value. We also need to have the
+ * replicationFactor on hand for the test suite so we can setup the quorum
+ * in the test fixture correctly. However, it is difficult to reach the
+ * appropriate HAJournal.config file from the text fixture during
+ * {@link #setUp()}. Therefore, for the test setup, this is achieved by
+ * overriding this abstract method in the test class.
+ */
+ protected int replicationFactor() {
+
+ return 3;
+
+ }
+
+ /**
* Return Zookeeper quorum that can be used to reflect (or act on) the
* distributed quorum state for the logical service.
*
@@ -1407,7 +1429,7 @@
// Note: Save reference.
this.zookeeper = new ZooKeeper(zoohosts, sessionTimeout, new Watcher() {
@Override
- public void process(WatchedEvent event) {
+ public void process(final WatchedEvent event) {
if (log.isInfoEnabled())
log.info(event);
}
@@ -1457,9 +1479,19 @@
logicalServiceZPath = logicalServiceZPathPrefix + "/"
+ logicalServiceId;
- final int replicationFactor = (Integer) config.getEntry(
- ZookeeperClientConfig.Options.NAMESPACE,
- ConfigurationOptions.REPLICATION_FACTOR, Integer.TYPE);
+ /**
+ * Note: This is defined in the HAJournal.config file, which is where
+ * the HAJournalServer gets the correct value.
+ *
+ * However, we also need to have the replicationFactor on hand for the
+ * test suite so we can setup the quorum in the test fixture correctly.
+ */
+ final int replicationFactor = replicationFactor();
+// {
+// replicationFactor = (Integer) config.getEntry(
+// ConfigurationOptions.COMPONENT,
+// ConfigurationOptions.REPLICATION_FACTOR, Integer.TYPE);
+// }
// if (!zka.awaitZookeeperConnected(10, TimeUnit.SECONDS)) {
//
@@ -1565,7 +1597,7 @@
*
* @author <a href="mailto:tho...@us...">Bryan Thompson</a>
*/
- public abstract class StartServerTask implements Callable<HAGlue> {
+ abstract class StartServerTask implements Callable<HAGlue> {
private final String name;
private final String configName;
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA5JournalServerTestCase.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA5JournalServerTestCase.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA5JournalServerTestCase.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -1,3 +1,26 @@
+/**
+
+Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved.
+
+Contact:
+ SYSTAP, LLC
+ 4501 Tower Road
+ Greensboro, NC 27410
+ lic...@bi...
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
package com.bigdata.journal.jini.ha;
import java.io.File;
@@ -16,17 +39,13 @@
import com.bigdata.ha.HAGlue;
import com.bigdata.jini.start.IServiceListener;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.SafeShutdownATask;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.SafeShutdownBTask;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.SafeShutdownCTask;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.SafeShutdownTask;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.ServiceListener;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.StartATask;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.StartBTask;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.StartCTask;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.StartServerTask;
import com.bigdata.quorum.AsynchronousQuorumCloseException;
+/**
+ * Test suite for HA5.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ */
public class AbstractHA5JournalServerTestCase extends
AbstractHA3JournalServerTestCase {
@@ -53,10 +72,6 @@
protected final int D_JETTY_PORT = C_JETTY_PORT + 1;
protected final int E_JETTY_PORT = D_JETTY_PORT + 1;
- protected String getZKConfigFile() {
- return "zkClient5.config"; // 5 stage pipeline
- }
-
/**
* These {@link IServiceListener}s are used to reliably detect that the
* corresponding process starts and (most importantly) that it is really
@@ -88,6 +103,13 @@
return new File(getServiceDirE(), "HALog");
}
+ @Override
+ protected int replicationFactor() {
+
+ return 5;
+
+ }
+
/**
* Start A then B then C. As each service starts, this method waits for that
* service to appear in the pipeline in the proper position.
@@ -141,7 +163,7 @@
}
/**
- * Start of 3 HA services (this happens in the ctor).
+ * Start of 5 HA services (this happens in the ctor).
*
* @param sequential
* True if the startup should be sequential or false if
@@ -362,6 +384,7 @@
super(name);
}
+ @Override
protected void destroyAll() throws AsynchronousQuorumCloseException,
InterruptedException, TimeoutException {
/**
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -1259,35 +1259,34 @@
}
- /**
- * The effective name for this test as used to name the directories in which
- * we store things.
- *
- * TODO If there are method name collisions across the different test
- * classes then the test suite name can be added to this. Also, if there are
- * file naming problems, then this value can be munged before it is
- * returned.
- */
- private final String effectiveTestFileName = getClass().getSimpleName()
- + "." + getName();
+// /**
+// * The effective name for this test as used to name the directories in which
+// * we store things.
+// *
+// * TODO If there are method name collisions across the different test
+// * classes then the test suite name can be added to this. Also, if there are
+// * file naming problems, then this value can be munged before it is
+// * returned.
+// */
+// private final String effectiveTestFileName = getClass().getSimpleName()
+// + "." + getName();
+//
+// /**
+// * The directory that is the parent of each {@link HAJournalServer}'s
+// * individual service directory.
+// */
+// protected File getTestDir() {
+// return new File(TGT_PATH, getEffectiveTestFileName());
+// }
+//
+// /**
+// * The effective name for this test as used to name the directories in which
+// * we store things.
+// */
+// protected String getEffectiveTestFileName() {
+//
+// return effectiveTestFileName;
+//
+// }
- /**
- * The directory that is the parent of each {@link HAJournalServer}'s
- * individual service directory.
- */
- protected File getTestDir() {
- return new File(TGT_PATH, getEffectiveTestFileName());
- }
-
- /**
- * The effective name for this test as used to name the directories in which
- * we store things.
- */
- protected String getEffectiveTestFileName() {
-
- return effectiveTestFileName;
-
- }
-
-
}
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-D.config
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-D.config 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-D.config 2014-04-15 14:16:12 UTC (rev 8122)
@@ -67,7 +67,7 @@
private static haPort = ConfigMath.add(9090,3);
// The #of services in the write pipeline.
- private static replicationFactor = 5;
+ private static replicationFactor = 5; // Note: overridden in the HA5 test suites.
// The logical service identifier shared by all members of the quorum.
private static logicalServiceId = System.getProperty("test.logicalServiceId","CI-HAJournal-1");
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-E.config
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-E.config 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-E.config 2014-04-15 14:16:12 UTC (rev 8122)
@@ -67,7 +67,7 @@
private static haPort = ConfigMath.add(9090,4);
// The #of services in the write pipeline.
- private static replicationFactor = 5;
+ private static replicationFactor = 5; // Note: overridden in the HA5 test suites.
// The logical service identifier shared by all members of the quorum.
private static logicalServiceId = System.getProperty("test.logicalServiceId","CI-HAJournal-1");
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/StressTestHA3JournalServer.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/StressTestHA3JournalServer.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/StressTestHA3JournalServer.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -75,6 +75,13 @@
super(name);
}
+ @Override
+ protected int replicationFactor() {
+
+ return 3;
+
+ }
+
/**
* Complex hack to override the {@link HAJournal} properties.
*
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -74,6 +74,11 @@
// Basic tests for a single HAJournalServer (quorum does not meet)
suite.addTestSuite(TestHAJournalServer.class);
+ // HA1 test suite.
+ suite.addTestSuite(TestHA1JournalServer.class);
+ suite.addTestSuite(TestHA1SnapshotPolicy.class);
+ suite.addTestSuite(TestHA1SnapshotPolicy2.class);
+
// HA2 test suite (k=3, but only 2 services are running).
suite.addTestSuite(TestHA2JournalServer.class);
@@ -108,17 +113,16 @@
// Verify ability to override the HAJournal implementation class.
suite.addTestSuite(TestHAJournalServerOverride.class);
- // Test suite of longer running stress tests for an HA3 cluster.
- suite.addTestSuite(StressTestHA3JournalServer.class);
-
- // Test suite of longer running stress tests for an HA5 cluster.
+ // HA5 test suite.
suite.addTestSuite(TestHA5JournalServer.class);
suite.addTestSuite(TestHA5JournalServerWithHALogs.class);
- // Test suite of longer running stress tests for an HA1 cluster.
- suite.addTestSuite(TestHA1JournalServer.class);
- suite.addTestSuite(TestHA1SnapshotPolicy.class);
- suite.addTestSuite(TestHA1SnapshotPolicy2.class);
+ /*
+ * Stress tests.
+ */
+
+ // Test suite of longer running stress tests for an HA3 cluster.
+ suite.addTestSuite(StressTestHA3JournalServer.class);
return suite;
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -1,3 +1,26 @@
+/**
+
+Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved.
+
+Contact:
+ SYSTAP, LLC
+ 4501 Tower Road
+ Greensboro, NC 27410
+ lic...@bi...
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
package com.bigdata.journal.jini.ha;
import java.util.concurrent.TimeUnit;
@@ -3,10 +26,13 @@
import java.util.concurrent.TimeoutException;
-import com.bigdata.ha.HAGlue;
-import com.bigdata.ha.HAStatusEnum;
-
import net.jini.config.Configuration;
+import com.bigdata.ha.HAGlue;
+/**
+ * Test suite for HA1.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ */
public class TestHA1JournalServer extends AbstractHA3JournalServerTestCase {
@@ -27,15 +53,11 @@
"com.bigdata.journal.jini.ha.HAJournalServer.snapshotPolicy=new com.bigdata.journal.jini.ha.NoSnapshotPolicy()",
// "com.bigdata.journal.jini.ha.HAJournalServer.HAJournalClass=\""+HAJournalTest.class.getName()+"\"",
"com.bigdata.journal.jini.ha.HAJournalServer.onlineDisasterRecovery=true",
- "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor=1",
+ "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor="+replicationFactor(),
};
}
- protected String getZKConfigFile() {
- return "zkClient1.config"; // 1 stage pipeline
- }
-
public TestHA1JournalServer() {
}
@@ -43,40 +65,47 @@
super(name);
}
+ @Override
+ protected int replicationFactor() {
+
+ return 1;
+
+ }
+
public void testStartA() throws Exception {
- doStartA();
+ doStartA();
}
-
+
protected void doStartA() throws Exception {
try {
- quorum.awaitQuorum(awaitQuorumTimeout,
- TimeUnit.MILLISECONDS);
-
- fail("HA1 requires quorum of 1!");
+ quorum.awaitQuorum(awaitQuorumTimeout, TimeUnit.MILLISECONDS);
+
+ fail("HA1 requires quorum of 1!");
} catch (TimeoutException te) {
- // expected
+ // expected
}
// Start 1 service.
final HAGlue serverA = startA();
-
+
// this should succeed
final long token = quorum.awaitQuorum(awaitQuorumTimeout,
TimeUnit.MILLISECONDS);
-
+
assertEquals(token, awaitFullyMetQuorum());
-
+
final HAGlue leader = quorum.getClient().getLeader(token);
-
+
assertEquals(serverA, leader);
}
-
+
public void testSimpleTransaction() throws Exception {
- doStartA();
-
+
+ doStartA();
+
serverA.awaitHAReady(2, TimeUnit.SECONDS);
-
+
/*
* Awaiting HAReady is not sufficient since the service may still
* writing the initial transaction.
@@ -85,30 +114,27 @@
* status of a new journal being ready too soon to process an NSS
* request
*/
-
- awaitCommitCounter(1, new HAGlue[] { serverA});
-
- // Thread.sleep(100);
-
- // serverA.
-
- log.warn("Calling SimpleTransaction");
- simpleTransaction();
-
- awaitCommitCounter(2, new HAGlue[] { serverA});
+
+ awaitCommitCounter(1, new HAGlue[] { serverA });
+
+ simpleTransaction();
+
+ awaitCommitCounter(2, new HAGlue[] { serverA });
+
}
-
+
public void testMultiTransaction() throws Exception {
- doStartA();
-
- awaitCommitCounter(1, new HAGlue[] { serverA});
+ doStartA();
+
+ awaitCommitCounter(1, new HAGlue[] { serverA });
// Thread.sleep(1000);
-
+
final int NTRANS = 10;
- for (int t = 0; t < NTRANS; t++) {
- simpleTransaction();
- }
+ for (int t = 0; t < NTRANS; t++) {
+ simpleTransaction();
+ }
- awaitCommitCounter(NTRANS+1, new HAGlue[] { serverA});
+ awaitCommitCounter(NTRANS + 1, new HAGlue[] { serverA });
+ }
+
}
-}
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -30,10 +30,13 @@
super(name);
}
- protected String getZKConfigFile() {
- return "zkClient1.config"; // 1 stage pipeline
+ @Override
+ protected int replicationFactor() {
+
+ return 1;
+
}
-
+
/**
* {@inheritDoc}
* <p>
@@ -60,7 +63,7 @@
"com.bigdata.journal.jini.ha.HAJournalServer.snapshotPolicy=new com.bigdata.journal.jini.ha.DefaultSnapshotPolicy("+neverRun+",0)",
// "com.bigdata.journal.jini.ha.HAJournalServer.snapshotPolicy=new com.bigdata.journal.jini.ha.NoSnapshotPolicy()",
// "com.bigdata.journal.jini.ha.HAJournalServer.onlineDisasterRecovery=true",
- "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor=1",
+ "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor="+replicationFactor(),
};
}
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy2.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy2.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy2.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -1,13 +1,37 @@
+/**
+
+Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved.
+
+Contact:
+ SYSTAP, LLC
+ 4501 Tower Road
+ Greensboro, NC 27410
+ lic...@bi...
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
package com.bigdata.journal.jini.ha;
-import java.util.concurrent.TimeUnit;
-
import net.jini.config.Configuration;
import com.bigdata.ha.HAGlue;
-import com.bigdata.ha.halog.HALogWriter;
-import com.bigdata.ha.msg.HARootBlockRequest;
+/**
+ * Test suite for HA1 online backups and point in time restore.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ */
public class TestHA1SnapshotPolicy2 extends AbstractHA3BackupTestCase {
public TestHA1SnapshotPolicy2() {
@@ -17,11 +41,11 @@
super(name);
}
- /** How long to wait for snapshots to appear. */
- private final long awaitSnapshotMillis = 5000;
-
- protected String getZKConfigFile() {
- return "zkClient1.config"; // 1 stage pipeline
+ @Override
+ protected int replicationFactor() {
+
+ return 1;
+
}
/**
@@ -46,7 +70,7 @@
"com.bigdata.journal.jini.ha.HAJournalServer.restorePolicy=new com.bigdata.journal.jini.ha.DefaultRestorePolicy(0L,1,0)",
"com.bigdata.journal.jini.ha.HAJournalServer.snapshotPolicy=new com.bigdata.journal.jini.ha.DefaultSnapshotPolicy("+neverRun+",0)",
"com.bigdata.journal.jini.ha.HAJournalServer.onlineDisasterRecovery=true",
- "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor=1"
+ "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor="+replicationFactor()
};
}
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -181,9 +181,6 @@
assertDigestsEquals(new HAGlue[] { serverA, serverB });
// Verify can not write on follower.
- log.warn("ServerA port: " + serverA.getNSSPort());
- log.warn("ServerB port: " + serverB.getNSSPort());
-
assertWriteRejected(serverB);
// Start 3rd service.
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServer.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServer.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServer.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -1,3 +1,26 @@
+/**
+
+Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved.
+
+Contact:
+ SYSTAP, LLC
+ 4501 Tower Road
+ Greensboro, NC 27410
+ lic...@bi...
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
package com.bigdata.journal.jini.ha;
import java.util.concurrent.Callable;
@@ -10,9 +33,12 @@
import com.bigdata.ha.HAGlue;
import com.bigdata.ha.HAStatusEnum;
import com.bigdata.ha.msg.HARootBlockRequest;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.ABC;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.LargeLoadTask;
+/**
+ * HA5 test suite.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ */
public class TestHA5JournalServer extends AbstractHA5JournalServerTestCase {
/**
@@ -31,11 +57,18 @@
"com.bigdata.journal.jini.ha.HAJournalServer.snapshotPolicy=new com.bigdata.journal.jini.ha.NoSnapshotPolicy()",
// "com.bigdata.journal.jini.ha.HAJournalServer.HAJournalClass=\""+HAJournalTest.class.getName()+"\"",
"com.bigdata.journal.jini.ha.HAJournalServer.onlineDisasterRecovery=true",
- "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor=5",
+ "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor="+replicationFactor(),
};
}
+ @Override
+ protected int replicationFactor() {
+
+ return 5;
+
+ }
+
public TestHA5JournalServer() {
}
@@ -49,9 +82,11 @@
* @throws Exception
*/
public void testStartABC_DE() throws Exception {
- doStartABC_DE();
+
+ doStartABC_DE();
+
}
-
+
protected void doStartABC_DE() throws Exception {
// Start 3 services.
@@ -171,117 +206,115 @@
* HA5 is fully met after 5 services are started simultaneously
*/
public void testABCDESimultaneous() throws Exception {
-
- final ABCDE startup = new ABCDE(false);
-
- awaitFullyMetQuorum();
-
+
+ final ABCDE startup = new ABCDE(false);
+
+ awaitFullyMetQuorum();
+
startup.assertDigestsEqual();
}
-
+
/**
* HA5 is fully met after 5 services are started sequentially
*/
public void testABCDESequential() throws Exception {
-
- final ABCDE startup = new ABCDE(true);
-
- awaitFullyMetQuorum();
-
+
+ final ABCDE startup = new ABCDE(true);
+
+ awaitFullyMetQuorum();
+
startup.assertDigestsEqual();
}
-
+
/**
* HA5 remains met with 1 service failure
*/
public void testABCDEShutdownC() throws Exception {
-
- final ABCDE startup = new ABCDE(true);
-
- final long token = awaitFullyMetQuorum();
-
+
+ final ABCDE startup = new ABCDE(true);
+
+ final long token = awaitFullyMetQuorum();
+
startup.assertDigestsEqual();
-
+
shutdownC();
-
- awaitPipeline(new HAGlue[] {serverA, serverB, serverD, serverE});
-
+
+ awaitPipeline(new HAGlue[] { serverA, serverB, serverD, serverE });
+
assertEquals(token, awaitMetQuorum());
}
-
+
/**
* HA5 remains met with 2 service failures
*/
public void testABCDEShutdownBD() throws Exception {
-
- final ABCDE startup = new ABCDE(true);
-
- final long token = awaitFullyMetQuorum();
-
+
+ final ABCDE startup = new ABCDE(true);
+
+ final long token = awaitFullyMetQuorum();
+
startup.assertDigestsEqual();
-
+
shutdownB();
shutdownD();
-
- awaitPipeline(new HAGlue[] {serverA, serverC, serverE});
-
+
+ awaitPipeline(new HAGlue[] { serverA, serverC, serverE });
+
assertEquals(token, awaitMetQuorum());
}
-
+
/**
- * HA5 breaks with 3 service failures and re-meets when one
- * is restarted
+ * HA5 breaks with 3 service failures and re-meets when one is restarted
*/
public void testABCDEShutdownBCD() throws Exception {
-
- final ABCDE startup = new ABCDE(true);
-
- final long token = awaitFullyMetQuorum();
-
+
+ final ABCDE startup = new ABCDE(true);
+
+ final long token = awaitFullyMetQuorum();
+
startup.assertDigestsEqual();
-
+
shutdownB();
shutdownC();
shutdownD();
-
+
// Non-deterministic pipeline order
// awaitPipeline(new HAGlue[] {serverA, serverE});
-
+
try {
- awaitMetQuorum();
- fail("Quorum should not be met");
+ awaitMetQuorum();
+ fail("Quorum should not be met");
} catch (TimeoutException te) {
- // expected
+ // expected
}
-
+
startC();
-
+
assertFalse(token == awaitMetQuorum());
}
-
+
/**
- * HA5 breaks when leader fails, meets on new token
- * then fully meets on same token when previous leader
- * is restarted
+ * HA5 breaks when leader fails, meets on new token then fully meets on same
+ * token when previous leader is restarted
*/
public void testABCDEShutdownLeader() throws Exception {
-
- final ABCDE startup = new ABCDE(true);
-
- final long token = awaitFullyMetQuorum();
-
+
+ final ABCDE startup = new ABCDE(true);
+
+ final long token = awaitFullyMetQuorum();
+
startup.assertDigestsEqual();
-
+
shutdownA();
-
+
// pipeline order is non-deterministic
-
+
final long token2 = awaitMetQuorum();
-
- assertFalse(token==token2);
-
+
+ assertFalse(token == token2);
+
startA();
-
+
assertTrue(token2 == awaitFullyMetQuorum());
}
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServerWithHALogs.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServerWithHALogs.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServerWithHALogs.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -1,3 +1,26 @@
+/**
+
+Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved.
+
+Contact:
+ SYSTAP, LLC
+ 4501 Tower Road
+ Greensboro, NC 27410
+ lic...@bi...
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
package com.bigdata.journal.jini.ha;
import java.io.File;
@@ -3,13 +26,16 @@
import java.util.Calendar;
+import net.jini.config.Configuration;
+
import com.bigdata.ha.HAGlue;
import com.bigdata.ha.halog.HALogReader;
import com.bigdata.ha.halog.IHALogReader;
import com.bigdata.journal.CommitCounterUtility;
-import com.bigdata.journal.jini.ha.AbstractHA3JournalServerTestCase.ABC;
-import net.jini.config.Configuration;
-import junit.framework.TestCase;
-
+/**
+ * HA5 test suite.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ */
public class TestHA5JournalServerWithHALogs extends AbstractHA5JournalServerTestCase {
@@ -46,6 +72,13 @@
}
+ @Override
+ protected int replicationFactor() {
+
+ return 5;
+
+ }
+
/**
* {@inheritDoc}
* <p>
@@ -67,7 +100,7 @@
return new String[]{
"com.bigdata.journal.jini.ha.HAJournalServer.restorePolicy=new com.bigdata.journal.jini.ha.DefaultRestorePolicy()",
"com.bigdata.journal.jini.ha.HAJournalServer.snapshotPolicy=new com.bigdata.journal.jini.ha.DefaultSnapshotPolicy("+neverRun+",0)",
- "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor=5",
+ "com.bigdata.journal.jini.ha.HAJournalServer.replicationFactor="+replicationFactor(),
};
}
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-A.properties
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-A.properties 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-A.properties 2014-04-15 14:16:12 UTC (rev 8122)
@@ -11,7 +11,7 @@
#log4j.logger.com.bigdata.service.jini.lookup=ALL
#log4j.logger.com.bigdata.quorum=INFO
log4j.logger.com.bigdata.quorum.zk=INFO
-log4j.logger.com.bigdata.io.writecache=INFO
+#log4j.logger.com.bigdata.io.writecache=INFO
#log4j.logger.com.bigdata.zookeeper=INFO
#log4j.logger.com.bigdata.zookeeper.ZooHelper=ALL
log4j.logger.com.bigdata.rdf.internal.LexiconConfiguration=FATAL
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient.config
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient.config 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient.config 2014-04-15 14:16:12 UTC (rev 8122)
@@ -30,9 +30,6 @@
private static fedname = "benchmark";
- // The #of services in the write pipeline.
- private static replicationFactor = 3;
-
/* The logical service identifier shared by all members of the quorum.
*
* Note: The test fixture ignores this value. For the avoidance of
Deleted: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient1.config
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient1.config 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient1.config 2014-04-15 14:16:12 UTC (rev 8122)
@@ -1,91 +0,0 @@
-/* Zookeeper client only configuration.
- */
-import java.io.File;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.util.UUID;
-
-import com.bigdata.util.NV;
-import com.bigdata.util.config.NicUtil;
-import com.bigdata.journal.Options;
-import com.bigdata.journal.BufferMode;
-import com.bigdata.journal.jini.ha.HAJournal;
-import com.bigdata.jini.lookup.entry.*;
-import com.bigdata.service.IBigdataClient;
-import com.bigdata.service.AbstractTransactionService;
-import com.bigdata.service.jini.*;
-import com.bigdata.service.jini.lookup.DataServiceFilter;
-import com.bigdata.service.jini.master.ServicesTemplate;
-import com.bigdata.jini.start.config.*;
-import com.bigdata.jini.util.ConfigMath;
-
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.ACL;
-import org.apache.zookeeper.data.Id;
-
-/*
- * Globals.
- */
-bigdata {
-
- private static fedname = "benchmark";
-
- // The #of services in the write pipeline.
- private static replicationFactor = 1;
-
- /* The logical service identifier shared by all members of the quorum.
- *
- * Note: The test fixture ignores this value. For the avoidance of
- * doubt, the value is commented out.
- */
- //private static logicalServiceId = "CI-HAJournal-1";
-
- // zookeeper
- static private sessionTimeout = (int)ConfigMath.s2ms(20);
-
-}
-
-/*
- * Zookeeper client configuration.
- */
-org.apache.zookeeper.ZooKeeper {
-
- /* Root znode for the federation instance. */
- zroot = "/" + bigdata.fedname;
-
- /* A comma separated list of host:port pairs, where the port is
- * the CLIENT port for the zookeeper server instance.
- */
- // standalone.
- servers = "localhost:2081";
- // ensemble
-// servers = bigdata.zoo1+":2181"
-// + ","+bigdata.zoo2+":2181"
-// + ","+bigdata.zoo3+":2181"
-// ;
-
- /* Session timeout (optional). */
- sessionTimeout = bigdata.sessionTimeout;
-
- /*
- * ACL for the zookeeper nodes created by the bigdata federation.
- *
- * Note: zookeeper ACLs are not transmitted over secure channels
- * and are placed into plain text Configuration files by the
- * ServicesManagerServer.
- */
- acl = new ACL[] {
-
- new ACL(ZooDefs.Perms.ALL, new Id("world", "anyone"))
-
- };
-
- /*
- * Note: Normally on the HAJournalServer component. Hacked in the test
- * suite setup to look at the ZooKeeper component instead.
- */
-
- logicalServiceId = bigdata.logicalServiceId;
-
- replicationFactor = bigdata.replicationFactor;
-}
Deleted: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient5.config
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient5.config 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient5.config 2014-04-15 14:16:12 UTC (rev 8122)
@@ -1,91 +0,0 @@
-/* Zookeeper client only configuration.
- */
-import java.io.File;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.util.UUID;
-
-import com.bigdata.util.NV;
-import com.bigdata.util.config.NicUtil;
-import com.bigdata.journal.Options;
-import com.bigdata.journal.BufferMode;
-import com.bigdata.journal.jini.ha.HAJournal;
-import com.bigdata.jini.lookup.entry.*;
-import com.bigdata.service.IBigdataClient;
-import com.bigdata.service.AbstractTransactionService;
-import com.bigdata.service.jini.*;
-import com.bigdata.service.jini.lookup.DataServiceFilter;
-import com.bigdata.service.jini.master.ServicesTemplate;
-import com.bigdata.jini.start.config.*;
-import com.bigdata.jini.util.ConfigMath;
-
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.ACL;
-import org.apache.zookeeper.data.Id;
-
-/*
- * Globals.
- */
-bigdata {
-
- private static fedname = "benchmark";
-
- // The #of services in the write pipeline.
- private static replicationFactor = 5;
-
- /* The logical service identifier shared by all members of the quorum.
- *
- * Note: The test fixture ignores this value. For the avoidance of
- * doubt, the value is commented out.
- */
- //private static logicalServiceId = "CI-HAJournal-1";
-
- // zookeeper
- static private sessionTimeout = (int)ConfigMath.s2ms(20);
-
-}
-
-/*
- * Zookeeper client configuration.
- */
-org.apache.zookeeper.ZooKeeper {
-
- /* Root znode for the federation instance. */
- zroot = "/" + bigdata.fedname;
-
- /* A comma separated list of host:port pairs, where the port is
- * the CLIENT port for the zookeeper server instance.
- */
- // standalone.
- servers = "localhost:2081";
- // ensemble
-// servers = bigdata.zoo1+":2181"
-// + ","+bigdata.zoo2+":2181"
-// + ","+bigdata.zoo3+":2181"
-// ;
-
- /* Session timeout (optional). */
- sessionTimeout = bigdata.sessionTimeout;
-
- /*
- * ACL for the zookeeper nodes created by the bigdata federation.
- *
- * Note: zookeeper ACLs are not transmitted over secure channels
- * and are placed into plain text Configuration files by the
- * ServicesManagerServer.
- */
- acl = new ACL[] {
-
- new ACL(ZooDefs.Perms.ALL, new Id("world", "anyone"))
-
- };
-
- /*
- * Note: Normally on the HAJournalServer component. Hacked in the test
- * suite setup to look at the ZooKeeper component instead.
- */
-
- logicalServiceId = bigdata.logicalServiceId;
-
- replicationFactor = bigdata.replicationFactor;
-}
Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java
===================================================================
--- branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java 2014-04-15 13:01:24 UTC (rev 8121)
+++ branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java 2014-04-15 14:16:12 UTC (rev 8122)
@@ -184,7 +184,7 @@
* withstand a failure.
*/
static public final URI ReplicationFactor = new URIImpl(BDFNS
- + "replicationCount");
+ + "replicationFactor");
/**
* An {@link IBigdataFederation}.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|