anton-vinogradov commented on a change in pull request #8294: URL: https://github.com/apache/ignite/pull/8294#discussion_r532585654
########## File path: modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/load/UuidDataLoaderApplication.java ########## @@ -0,0 +1,46 @@ +/* + * 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. + */ + +package org.apache.ignite.internal.ducktest.tests.load; Review comment: why the package name is "load" but teat name is "snapshot_test"? ########## File path: modules/ducktests/tests/ignitetest/services/utils/templates/cache_macro.j2 ########## @@ -22,10 +22,20 @@ {% for cache in caches %} <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="name" value="{{ cache.name }}"/> + <property name="cacheMode" value="{{ cache.cache_mode or 'PARTITIONED' }}"/> {% if cache.cache_mode == 'PARTITIONED' %} - <property name="backups" value="{{ cache.backups or 0 }}"/> + <property name="backups" value="{{ cache.backups or 0 }}"/> Review comment: ASAIK you may set backups at each mode, but replicated will ignore of fail. please simplify this. ########## File path: modules/ducktests/tests/ignitetest/services/utils/templates/ignite.xml.j2 ########## @@ -40,6 +40,12 @@ <property name="failureDetectionTimeout" value="{{ config.failure_detection_timeout }}"/> <property name="systemWorkerBlockedTimeout" value="{{ config.sys_worker_blocked_timeout }}"/> + {% if config.version >= '2.8.0' %} + <property name="metricExporterSpi"> Review comment: should this be set only when tests require this explicitly? ########## File path: modules/ducktests/tests/ignitetest/services/utils/templates/cache_macro.j2 ########## @@ -22,10 +22,20 @@ {% for cache in caches %} <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="name" value="{{ cache.name }}"/> + <property name="cacheMode" value="{{ cache.cache_mode or 'PARTITIONED' }}"/> Review comment: duplicated default from cache.py ########## File path: modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/load/UuidDataLoaderApplication.java ########## @@ -0,0 +1,46 @@ +/* + * 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. + */ + +package org.apache.ignite.internal.ducktest.tests.load; + +import java.util.UUID; +import com.fasterxml.jackson.databind.JsonNode; +import org.apache.ignite.IgniteDataStreamer; +import org.apache.ignite.internal.ducktest.utils.IgniteAwareApplication; + +/** + * Loading random uuids to cache. + */ +public class UuidDataLoaderApplication extends IgniteAwareApplication { + /** {@inheritDoc} */ + @Override public void run(JsonNode jNode) { + String cacheName = jNode.get("cacheName").asText(); + + long size = jNode.get("size").asLong(); + + int dataSize = jNode.get("dataSize").asInt(); + + markInitialized(); Review comment: what the reason to have markInitialized()here since service starts in .run() way? ########## File path: modules/ducktests/tests/ignitetest/services/utils/templates/cache_macro.j2 ########## @@ -22,10 +22,20 @@ {% for cache in caches %} <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="name" value="{{ cache.name }}"/> + <property name="cacheMode" value="{{ cache.cache_mode or 'PARTITIONED' }}"/> {% if cache.cache_mode == 'PARTITIONED' %} - <property name="backups" value="{{ cache.backups or 0 }}"/> + <property name="backups" value="{{ cache.backups or 0 }}"/> {% endif %} <property name="atomicityMode" value="{{ cache.atomicity_mode or 'ATOMIC' }}"/> + {% if cache.indexed_types %} + <property name="indexedTypes"> Review comment: should this be in a separate file? ########## File path: modules/ducktests/tests/ignitetest/services/utils/ignite_persistence.py ########## @@ -45,15 +47,17 @@ def init_persistent(self, node): """ node.account.mkdirs(self.PERSISTENT_ROOT) node.account.mkdirs(self.TEMP_DIR) + node.account.mkdirs(self.LOGS_DIR) Review comment: each ssh spent 300 ms on the test cluster. could we pass all the dirs at one mkdirs()? ########## File path: modules/ducktests/tests/ignitetest/services/utils/ignite_aware.py ########## @@ -351,3 +360,16 @@ def __dump_netfilter_settings(node): Reads current netfilter settings on the node for debugging purposes. """ return str(node.account.ssh_client.exec_command("sudo iptables -L -n")[1].read(), sys.getdefaultencoding()) + + def restart(self): + """ + Restart ignite cluster without cleaning. + """ + self.stop() + Review comment: why not just stop()->start()? ########## File path: modules/ducktests/tests/ignitetest/services/utils/templates/log4j.xml.j2 ########## @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" - "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd"> - -<!-- - 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. ---> - -<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> - <appender name="CONSOLE_ERR" class="org.apache.log4j.ConsoleAppender"> - <param name="Target" value="System.err"/> - - <layout class="org.apache.log4j.PatternLayout"> - <param name="ConversionPattern" value="[%d{{ISO8601}}][%-5p][%t][%c{{1}}] %m%n"/> - </layout> - </appender> - - <category name="org.springframework"> - <level value="WARN"/> - </category> - - <category name="org.eclipse.jetty"> - <level value="WARN"/> - </category> - - <category name="org.eclipse.jetty.util.log"> - <level value="ERROR"/> - </category> - - <category name="org.eclipse.jetty.util.component"> - <level value="ERROR"/> - </category> - - <category name="com.amazonaws"> - <level value="WARN"/> - </category> - - <category name="org.apache.ignite.spi.discovery"> - <level value="INFO"/> - </category> - - <category name="org.apache.zookeeper"> Review comment: Lost ########## File path: modules/ducktests/tests/ignitetest/services/utils/templates/cache_macro.j2 ########## @@ -22,10 +22,20 @@ {% for cache in caches %} <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="name" value="{{ cache.name }}"/> + <property name="cacheMode" value="{{ cache.cache_mode or 'PARTITIONED' }}"/> {% if cache.cache_mode == 'PARTITIONED' %} - <property name="backups" value="{{ cache.backups or 0 }}"/> + <property name="backups" value="{{ cache.backups or 0 }}"/> {% endif %} <property name="atomicityMode" value="{{ cache.atomicity_mode or 'ATOMIC' }}"/> Review comment: also duplicates default, let's refactor this. ########## File path: modules/ducktests/tests/ignitetest/services/utils/ignite_persistence.py ########## @@ -28,12 +28,14 @@ class PersistenceAware: """ # Root directory for persistent output PERSISTENT_ROOT = "/mnt/service" - STDOUT_STDERR_CAPTURE = os.path.join(PERSISTENT_ROOT, "console.log") TEMP_DIR = os.path.join(PERSISTENT_ROOT, "tmp") + LOGS_DIR = os.path.join(PERSISTENT_ROOT, "logs") + STDOUT_STDERR_CAPTURE = os.path.join(LOGS_DIR, "console.log") + CONSOLE_ALL_CAPTURE = os.path.join(LOGS_DIR, "console_all.log") Review comment: STDOUT_STDERR_CAPTURE -> console.log but CONSOLE_ALL_CAPTURE -> console_all.log ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
