Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/apache/iotdb into pr/12737
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveYurongSu committed Jun 19, 2024
2 parents abb64f3 + 612ecd4 commit 25ecfd9
Show file tree
Hide file tree
Showing 103 changed files with 2,658 additions and 1,104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ public class ClusterConstant {
public static final String COMMON_PROPERTIES_FILE = "iotdb-common.properties";
public static final String IOTDB_SYSTEM_PROPERTIES_FILE = "iotdb-system.properties";

public static final String SYSTEM_PROPERTIES_FILE = "system.properties";
public static final String CONFIG_NODE_SYSTEM_PROPERTIES_FILE = "confignode-system.properties";

// Properties' keys
// Common
public static final String CONFIG_NODE_CONSENSUS_PROTOCOL_CLASS =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.apache.iotdb.it.env.cluster.node;

import org.apache.iotdb.commons.conf.IoTDBConstant;
import org.apache.iotdb.confignode.conf.ConfigNodeConstant;
import org.apache.iotdb.it.env.cluster.EnvUtils;
import org.apache.iotdb.it.env.cluster.config.MppBaseConfig;
import org.apache.iotdb.it.env.cluster.config.MppJVMConfig;
Expand All @@ -37,7 +38,6 @@
import static org.apache.iotdb.it.env.cluster.ClusterConstant.CONFIG_NODE_INIT_HEAP_SIZE;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.CONFIG_NODE_MAX_DIRECT_MEMORY_SIZE;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.CONFIG_NODE_MAX_HEAP_SIZE;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.CONFIG_NODE_SYSTEM_PROPERTIES_FILE;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.DATA_REGION_CONSENSUS_PROTOCOL_CLASS;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.DATA_REPLICATION_FACTOR;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.DEFAULT_CONFIG_NODE_COMMON_PROPERTIES;
Expand Down Expand Up @@ -105,7 +105,7 @@ protected String getDefaultCommonConfigPath() {

@Override
public String getSystemPropertiesPath() {
return workDirFilePath("data/confignode/system", CONFIG_NODE_SYSTEM_PROPERTIES_FILE);
return workDirFilePath("data/confignode/system", ConfigNodeConstant.SYSTEM_FILE_NAME);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.apache.iotdb.it.env.cluster.node;

import org.apache.iotdb.commons.conf.IoTDBConstant;
import org.apache.iotdb.db.conf.IoTDBStartCheck;
import org.apache.iotdb.it.env.cluster.EnvUtils;
import org.apache.iotdb.it.env.cluster.config.MppBaseConfig;
import org.apache.iotdb.it.env.cluster.config.MppJVMConfig;
Expand Down Expand Up @@ -61,7 +62,6 @@
import static org.apache.iotdb.it.env.cluster.ClusterConstant.REST_SERVICE_PORT;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.SCHEMA_REGION_CONSENSUS_PROTOCOL_CLASS;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.SCHEMA_REPLICATION_FACTOR;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.SYSTEM_PROPERTIES_FILE;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.TARGET;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.USER_DIR;

Expand Down Expand Up @@ -139,7 +139,7 @@ protected String getDefaultCommonConfigPath() {

@Override
public String getSystemPropertiesPath() {
return workDirFilePath("data/datanode/system/schema", SYSTEM_PROPERTIES_FILE);
return workDirFilePath("data/datanode/system/schema", IoTDBStartCheck.PROPERTIES_FILE_NAME);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void tearDown() throws Exception {
}

@Test
public void RecoverTest1() {
public void recoverTest1() {
// stop cluster
EnvFactory.getEnv().shutdownAllDataNodes();
logger.info("All DataNodes are shut down");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@
* under the License.
*/

package org.apache.iotdb.db.it.regionscan;
package org.apache.iotdb.db.it.schema.regionscan;

import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
import org.apache.iotdb.util.AbstractSchemaIT;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

import java.sql.Connection;
import java.sql.ResultSet;
Expand All @@ -45,9 +44,8 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
public class IoTDBActiveRegionScanIT {
public class IoTDBActiveRegionScanIT extends AbstractSchemaIT {
// Data can be viewed in
// https://docs.google.com/spreadsheets/d/11tNRIaHmNdFWc0RC4yAloO6JJbmo9S5qxwAqWxeVY6c/edit#gid=0
public static final String[] common_insert_sqls =
Expand Down Expand Up @@ -145,6 +143,10 @@ public class IoTDBActiveRegionScanIT {
public static final String COUNT_TIMESERIES_COLUMN_NAMES = "count(timeseries)";
public static final String COUNT_DEVICES_COLUMN_NAMES = "count(devices)";

public IoTDBActiveRegionScanIT(SchemaTestMode schemaTestMode) {
super(schemaTestMode);
}

public static void insertData() {
try (Connection connection = EnvFactory.getEnv().getConnection();
Statement statement = connection.createStatement()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@
* under the License.
*/

package org.apache.iotdb.db.it.regionscan;
package org.apache.iotdb.db.it.schema.regionscan;

import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
public class IoTDBActiveRegionScanIT2 extends IoTDBActiveRegionScanIT {
public IoTDBActiveRegionScanIT2(SchemaTestMode schemaTestMode) {
super(schemaTestMode);
}

@BeforeClass
public static void setUp() throws Exception {
EnvFactory.getEnv()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,32 @@
* under the License.
*/

package org.apache.iotdb.db.it.regionscan;
package org.apache.iotdb.db.it.schema.regionscan;

import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
import org.apache.iotdb.util.AbstractSchemaIT;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

import java.sql.Connection;
import java.sql.Statement;

import static org.apache.iotdb.db.it.regionscan.IoTDBActiveRegionScanIT.COUNT_DEVICES_COLUMN_NAMES;
import static org.apache.iotdb.db.it.regionscan.IoTDBActiveRegionScanIT.COUNT_TIMESERIES_COLUMN_NAMES;
import static org.apache.iotdb.db.it.regionscan.IoTDBActiveRegionScanIT.SHOW_DEVICES_COLUMN_NAMES;
import static org.apache.iotdb.db.it.regionscan.IoTDBActiveRegionScanIT.SHOW_TIMESERIES_COLUMN_NAMES;
import static org.apache.iotdb.db.it.regionscan.IoTDBActiveRegionScanIT.basicCountActiveDeviceTest;
import static org.apache.iotdb.db.it.regionscan.IoTDBActiveRegionScanIT.basicShowActiveDeviceTest;
import static org.apache.iotdb.db.it.regionscan.IoTDBActiveRegionScanIT.common_insert_sqls;
import static org.apache.iotdb.db.it.schema.regionscan.IoTDBActiveRegionScanIT.COUNT_DEVICES_COLUMN_NAMES;
import static org.apache.iotdb.db.it.schema.regionscan.IoTDBActiveRegionScanIT.COUNT_TIMESERIES_COLUMN_NAMES;
import static org.apache.iotdb.db.it.schema.regionscan.IoTDBActiveRegionScanIT.SHOW_DEVICES_COLUMN_NAMES;
import static org.apache.iotdb.db.it.schema.regionscan.IoTDBActiveRegionScanIT.SHOW_TIMESERIES_COLUMN_NAMES;
import static org.apache.iotdb.db.it.schema.regionscan.IoTDBActiveRegionScanIT.basicCountActiveDeviceTest;
import static org.apache.iotdb.db.it.schema.regionscan.IoTDBActiveRegionScanIT.basicShowActiveDeviceTest;
import static org.apache.iotdb.db.it.schema.regionscan.IoTDBActiveRegionScanIT.common_insert_sqls;
import static org.junit.Assert.fail;

@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
public class IoTDBActiveRegionScanWithModsIT {
public class IoTDBActiveRegionScanWithModsIT extends AbstractSchemaIT {

private static String[] delete_sqls =
new String[] {
Expand All @@ -57,6 +55,10 @@ public class IoTDBActiveRegionScanWithModsIT {
"delete from root.sg.unaligned.d2.* where time > 40 and time <= 43"
};

public IoTDBActiveRegionScanWithModsIT(SchemaTestMode schemaTestMode) {
super(schemaTestMode);
}

public static void insertData() {
try (Connection connection = EnvFactory.getEnv().getConnection();
Statement statement = connection.createStatement()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@
* under the License.
*/

package org.apache.iotdb.db.it.regionscan;
package org.apache.iotdb.db.it.schema.regionscan;

import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
public class IoTDBActiveRegionScanWithModsIT2 extends IoTDBActiveRegionScanWithModsIT {
public IoTDBActiveRegionScanWithModsIT2(SchemaTestMode schemaTestMode) {
super(schemaTestMode);
}

@BeforeClass
public static void setUp() throws Exception {
EnvFactory.getEnv()
Expand Down
Loading

0 comments on commit 25ecfd9

Please sign in to comment.