asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murtadha Hubail (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: [NO ISSUE][TEST] Fix Checkpointing Test Config
Date Sun, 28 Jan 2018 02:48:23 GMT
Murtadha Hubail has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2332

Change subject: [NO ISSUE][TEST] Fix Checkpointing Test Config
......................................................................

[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
---
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/logging/CheckpointingTest.java
A asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
2 files changed, 59 insertions(+), 11 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/32/2332/1

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 f635d6f..ac3c6fe 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 @@
 
 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 @@
     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 @@
         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<>();
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..d84d4a6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
@@ -0,0 +1,57 @@
+; 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
+#jvm.args=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006
+
+[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

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2332
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I894119b9beb4b144edb881bff5caeb374fc29924
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <mhubail@apache.org>

Mime
View raw message