asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject asterixdb git commit: [NO ISSUE][TEST] Fix Checkpointing Test Config
Date Mon, 29 Jan 2018 14:41:31 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 59b1382be -> 9f6fa8876


[NO ISSUE][TEST] Fix Checkpointing Test Config

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- When managix was removed, the 2MB txn log file
  configuration for checkpointing test was lost
  and the test has been running with 250MB instead.
  This change adds a test config file with the
  required config for the checkpointing test.

Change-Id: I894119b9beb4b144edb881bff5caeb374fc29924
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2332
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/9f6fa887
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/9f6fa887
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/9f6fa887

Branch: refs/heads/master
Commit: 9f6fa8876eaef6f9721caf06855bf3bffb277e52
Parents: 59b1382
Author: Murtadha Hubail <mhubail@apache.org>
Authored: Mon Jan 29 00:33:14 2018 +0300
Committer: Michael Blow <mblow@apache.org>
Committed: Mon Jan 29 06:41:12 2018 -0800

----------------------------------------------------------------------
 .../asterix/test/logging/CheckpointingTest.java | 13 +----
 .../resources/cc-small-txn-log-partition.conf   | 56 ++++++++++++++++++++
 2 files changed, 58 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/9f6fa887/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/logging/CheckpointingTest.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/logging/CheckpointingTest.java
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/logging/CheckpointingTest.java
index 8a2bc1d..91d98e5 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/logging/CheckpointingTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/logging/CheckpointingTest.java
@@ -67,9 +67,9 @@ import org.junit.Test;
 
 public class CheckpointingTest {
 
-    private static final String TEST_CONFIG_FILE_NAME = "cc.conf";
+    private static final String TEST_CONFIG_FILE_NAME = "cc-small-txn-log-partition.conf";
     private static final String TEST_CONFIG_PATH = System.getProperty("user.dir") + File.separator
+ "src"
-            + File.separator + "main" + File.separator + "resources";
+            + File.separator + "test" + File.separator + "resources";
     private static final String TEST_CONFIG_FILE_PATH = TEST_CONFIG_PATH + File.separator
+ TEST_CONFIG_FILE_NAME;
     private static final IAType[] KEY_TYPES = { BuiltinType.AINT32 };
     private static final ARecordType RECORD_TYPE = new ARecordType("TestRecordType", new
String[] { "key", "value" },
@@ -88,7 +88,6 @@ public class CheckpointingTest {
     private static final String DATASET_NAME = "TestDS";
     private static final String DATA_TYPE_NAME = "DUMMY";
     private static final String NODE_GROUP_NAME = "DEFAULT";
-    private static final int TXN_LOG_PARTITION_SIZE = StorageUtil.getIntSizeInBytes(2, StorageUnit.MEGABYTE);
 
     @Before
     public void setUp() throws Exception {
@@ -101,18 +100,10 @@ public class CheckpointingTest {
         TestHelper.deleteExistingInstanceFiles();
     }
 
-    private List<Pair<IOption, Object>> setOpts() {
-        List<Pair<IOption, Object>> opts = new ArrayList<>();
-        opts.add(Pair.of(TransactionProperties.Option.TXN_LOG_PARTITIONSIZE, TXN_LOG_PARTITION_SIZE));
-        opts.add(Pair.of(TransactionProperties.Option.TXN_LOG_CHECKPOINT_POLLFREQUENCY, Integer.MAX_VALUE));
-        return opts;
-    }
-
     @Test
     public void testDeleteOldLogFiles() {
         try {
             TestNodeController nc = new TestNodeController(new File(TEST_CONFIG_FILE_PATH).getAbsolutePath(),
false);
-            nc.setOpts(setOpts());
             StorageComponentProvider storageManager = new StorageComponentProvider();
             nc.init();
             List<List<String>> partitioningKeys = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/9f6fa887/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf b/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
new file mode 100644
index 0000000..0b66cfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
@@ -0,0 +1,56 @@
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements.  See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership.  The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License.  You may obtain a copy of the License at
+;
+;   http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied.  See the License for the
+; specific language governing permissions and limitations
+; under the License.
+
+[nc/asterix_nc1]
+txn.log.dir=target/tmp/asterix_nc1/txnlog
+core.dump.dir=target/tmp/asterix_nc1/coredump
+iodevices=target/tmp/asterix_nc1/iodevice1,target/tmp/asterix_nc1/iodevice2
+nc.api.port=19004
+
+[nc/asterix_nc2]
+ncservice.port=9091
+txn.log.dir=target/tmp/asterix_nc2/txnlog
+core.dump.dir=target/tmp/asterix_nc2/coredump
+iodevices=target/tmp/asterix_nc2/iodevice1,target/tmp/asterix_nc2/iodevice2
+nc.api.port=19005
+
+[nc]
+address=127.0.0.1
+command=asterixnc
+app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
+jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
+storage.buffercache.pagesize=32KB
+storage.buffercache.size=48MB
+storage.memorycomponent.numpages=16
+storage.memorycomponent.globalbudget=512MB
+
+[cc]
+address = 127.0.0.1
+app.class=org.apache.asterix.hyracks.bootstrap.CCApplication
+heartbeat.period=2000
+heartbeat.max.misses=25
+
+[common]
+log.level = INFO
+compiler.framesize=32KB
+compiler.sortmemory=320KB
+compiler.groupmemory=160KB
+compiler.joinmemory=256KB
+messaging.frame.size=4096
+messaging.frame.count=512
+txn.log.partitionsize=2MB
+txn.log.checkpoint.pollfrequency=2147483647
\ No newline at end of file


Mime
View raw message