This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch clean
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/clean by this push:
new c8eafa837e5 ref
c8eafa837e5 is described below
commit c8eafa837e5bd75aa0df9d594d3d00942bf09b3f
Author: Caideyipi <[email protected]>
AuthorDate: Thu Jan 8 12:33:35 2026 +0800
ref
---
.../java/org/apache/iotdb/mqtt/MQTTClient.java | 6 +--
.../iotdb/AlignedTimeseriesSessionExample.java | 6 ---
.../main/java/org/apache/iotdb/SessionExample.java | 34 ++++++------
.../java/org/apache/iotdb/SessionPoolExample.java | 3 --
.../iotdb/SyntaxConventionRelatedExample.java | 12 ++---
.../it/env/cluster/config/MppCommonConfig.java | 3 --
.../env/cluster/config/MppSharedCommonConfig.java | 3 --
.../apache/iotdb/db/it/GrafanaApiServiceIT.java | 2 +-
.../apache/iotdb/db/it/IoTDBDatetimeFormatIT.java | 8 +--
.../org/apache/iotdb/db/it/IoTDBDeletionIT.java | 8 +--
.../org/apache/iotdb/db/it/IoTDBExampleIT.java | 14 ++---
.../apache/iotdb/db/it/IoTDBLoadLastCacheIT.java | 9 +---
.../org/apache/iotdb/db/it/IoTDBLoadTsFileIT.java | 49 -----------------
.../schema/CNPhysicalPlanGenerator.java | 7 ---
.../confignode/persistence/schema/ConfigMTree.java | 15 +-----
.../persistence/schema/ConfigMTreeTest.java | 63 +++++++++-------------
.../schemaregion/impl/SchemaRegionMemoryImpl.java | 16 ------
.../impl/mem/snapshot/MemMTreeSnapshotUtil.java | 3 --
.../db/tools/schema/SRStatementGenerator.java | 3 --
19 files changed, 61 insertions(+), 203 deletions(-)
diff --git a/example/mqtt/src/main/java/org/apache/iotdb/mqtt/MQTTClient.java
b/example/mqtt/src/main/java/org/apache/iotdb/mqtt/MQTTClient.java
index d6527ef94a2..c84ead139be 100644
--- a/example/mqtt/src/main/java/org/apache/iotdb/mqtt/MQTTClient.java
+++ b/example/mqtt/src/main/java/org/apache/iotdb/mqtt/MQTTClient.java
@@ -67,12 +67,8 @@ public class MQTTClient {
// publish a json array
sb.insert(0, "[");
sb.replace(sb.lastIndexOf(","), sb.length(), "]");
-<<<<<<< refs/remotes/upstream/clean
- connection.publish("root.sg.d1.s1", sb.toString().getBytes(),
QoS.AT_LEAST_ONCE, false);
- }
-=======
connection.publish("root.db.d1.s1", sb.toString().getBytes(),
QoS.AT_LEAST_ONCE, false);
->>>>>>> local
+ }
// The database must be created in advance
private static void linePayloadFormatter(BlockingConnection connection)
throws Exception {
diff --git
a/example/session/src/main/java/org/apache/iotdb/AlignedTimeseriesSessionExample.java
b/example/session/src/main/java/org/apache/iotdb/AlignedTimeseriesSessionExample.java
index 6e459de589b..529212cf14c 100644
---
a/example/session/src/main/java/org/apache/iotdb/AlignedTimeseriesSessionExample.java
+++
b/example/session/src/main/java/org/apache/iotdb/AlignedTimeseriesSessionExample.java
@@ -384,13 +384,7 @@ public class AlignedTimeseriesSessionExample {
schemaList.add(new MeasurementSchema("s1", TSDataType.INT64));
schemaList.add(new MeasurementSchema("s2", TSDataType.INT32));
-<<<<<<< refs/remotes/upstream/clean
Tablet tablet = new Tablet(ROOT_DB1_D1_VECTOR2, schemaList);
-=======
- Tablet tablet = new Tablet(ROOT_DB1_D1_VECTOR2, schemaList);
- long[] timestamps = tablet.timestamps;
- Object[] values = tablet.values;
->>>>>>> local
for (long time = 100; time < 200; time++) {
int row = tablet.getRowSize();
diff --git a/example/session/src/main/java/org/apache/iotdb/SessionExample.java
b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
index e0484e96d56..fd422fdfd7c 100644
--- a/example/session/src/main/java/org/apache/iotdb/SessionExample.java
+++ b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
@@ -244,12 +244,12 @@ public class SessionExample {
private static void createMultiTimeseriesWithNullPartical()
throws IoTDBConnectionException, StatementExecutionException {
- if (!session.checkTimeseriesExists("root.sg1.d2.s16")
- && !session.checkTimeseriesExists("root.sg1.d2.s17")) {
+ if (!session.checkTimeseriesExists("root.db1.d2.s16")
+ && !session.checkTimeseriesExists("root.db1.d2.s17")) {
List<String> paths = new ArrayList<>();
- paths.add("root.sg1.d2.s16");
- paths.add("root.sg1.d2.s17");
- paths.add("root.sg1.d2.s18");
+ paths.add("root.db1.d2.s16");
+ paths.add("root.db1.d2.s17");
+ paths.add("root.db1.d2.s18");
List<TSDataType> tsDataTypes = new ArrayList<>();
tsDataTypes.add(TSDataType.INT64);
tsDataTypes.add(TSDataType.INT64);
@@ -585,12 +585,12 @@ public class SessionExample {
Tablet tablet1 = new Tablet(ROOT_DB1_D1, schemaList, 100);
Tablet tablet2 = new Tablet("root.db1.d2", schemaList, 100);
- Tablet tablet3 = new Tablet("root.sg1.d3", schemaList, 100);
+ Tablet tablet3 = new Tablet("root.db1.d3", schemaList, 100);
Map<String, Tablet> tabletMap = new HashMap<>();
tabletMap.put(ROOT_DB1_D1, tablet1);
- tabletMap.put("root.sg1.d2", tablet2);
- tabletMap.put("root.sg1.d3", tablet3);
+ tabletMap.put("root.db1.d2", tablet2);
+ tabletMap.put("root.db1.d3", tablet3);
long timestamp = System.currentTimeMillis();
for (long row = 0; row < 100; row++) {
@@ -628,7 +628,7 @@ public class SessionExample {
* write data of String type or Binary type.
*/
private static void insertText() throws IoTDBConnectionException,
StatementExecutionException {
- String device = "root.sg1.text";
+ String device = "root.db1.text";
// the first data is String type and the second data is Binary type
List<Object> datas = Arrays.asList("String", new Binary("Binary",
TSFileConfig.STRING_CHARSET));
// insertRecord example
@@ -663,10 +663,10 @@ public class SessionExample {
private static void selectInto() throws IoTDBConnectionException,
StatementExecutionException {
session.executeNonQueryStatement(
- "select s1, s2, s3 into into_s1, into_s2, into_s3 from root.sg1.d1");
+ "select s1, s2, s3 into into_s1, into_s2, into_s3 from root.db1.d1");
try (SessionDataSet dataSet =
- session.executeQueryStatement("select into_s1, into_s2, into_s3 from
root.sg1.d1")) {
+ session.executeQueryStatement("select into_s1, into_s2, into_s3 from
root.db1.d1")) {
System.out.println(dataSet.getColumnNames());
while (dataSet.hasNext()) {
System.out.println(dataSet.next());
@@ -806,7 +806,7 @@ public class SessionExample {
List<String> paths = new ArrayList<>();
paths.add(ROOT_DB1_D1_S1);
paths.add(ROOT_DB1_D1_S2);
- paths.add(ROOT_SG1_D1_S3);
+ paths.add(ROOT_DB1_D1_S3);
List<TAggregationType> aggregations = new ArrayList<>();
aggregations.add(TAggregationType.COUNT);
@@ -855,8 +855,8 @@ public class SessionExample {
}
// get third column
- if (!iterator.isNull(ROOT_SG1_D1_S2)) {
- builder.append(iterator.getLong(ROOT_SG1_D1_S2)).append(",");
+ if (!iterator.isNull(ROOT_DB1_D1_S2)) {
+ builder.append(iterator.getLong(ROOT_DB1_D1_S2)).append(",");
} else {
builder.append("null").append(",");
}
@@ -869,8 +869,8 @@ public class SessionExample {
}
// get fifth column
- if (!iterator.isNull(ROOT_SG1_D1_S4)) {
- builder.append(iterator.getObject(ROOT_SG1_D1_S4));
+ if (!iterator.isNull(ROOT_DB1_D1_S4)) {
+ builder.append(iterator.getObject(ROOT_DB1_D1_S4));
} else {
builder.append("null");
}
@@ -881,7 +881,7 @@ public class SessionExample {
}
private static void nonQuery() throws IoTDBConnectionException,
StatementExecutionException {
- session.executeNonQueryStatement("insert into root.sg1.d1(timestamp,s1)
values(200, 1)");
+ session.executeNonQueryStatement("insert into root.db1.d1(timestamp,s1)
values(200, 1)");
}
private static void setTimeout() throws IoTDBConnectionException {
diff --git
a/example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java
b/example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java
index 3d12f99c05d..9827f105fad 100644
--- a/example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java
+++ b/example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java
@@ -101,8 +101,6 @@ public class SessionPoolExample {
}
}
-<<<<<<< refs/remotes/upstream/clean
-=======
private static void queryByRowRecord() {
for (int i = 0; i < 1; i++) {
service.submit(
@@ -125,7 +123,6 @@ public class SessionPoolExample {
}
}
->>>>>>> local
private static void queryByIterator() {
for (int i = 0; i < 1; i++) {
service.submit(
diff --git
a/example/session/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
b/example/session/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
index 53066a214d7..248f2916f83 100644
---
a/example/session/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
+++
b/example/session/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java
@@ -72,10 +72,10 @@ public class SyntaxConventionRelatedExample {
/**
* if you want to create a time series named root.db1.a, a possible SQL
statement would be like:
- * create timeseries root.sg1.a with datatype=FLOAT, encoding=RLE The path
should be written as
- * "root.sg1.a".
+ * create timeseries root.db1.a with datatype=FLOAT, encoding=RLE The path
should be written as
+ * "root.db1.a".
*/
- private static final String ROOT_DB1_NORMAL_NODE_EXAMPLE = "root.sg1.a";
+ private static final String ROOT_DB1_NORMAL_NODE_EXAMPLE = "root.db1.a";
public static void main(String[] args)
throws IoTDBConnectionException, StatementExecutionException {
@@ -93,7 +93,7 @@ public class SyntaxConventionRelatedExample {
session.setFetchSize(10000);
try {
- session.setStorageGroup("root.sg1");
+ session.setStorageGroup("root.db1");
} catch (StatementExecutionException e) {
if (e.getStatusCode() !=
TSStatusCode.PATH_ALREADY_EXIST.getStatusCode()) {
throw e;
@@ -102,9 +102,9 @@ public class SyntaxConventionRelatedExample {
// createTimeSeries
createTimeSeries();
- SessionDataSet dataSet = session.executeQueryStatement("show timeseries
root.sg1.*");
+ SessionDataSet dataSet = session.executeQueryStatement("show timeseries
root.db1.*");
// the expected paths would be:
- // [root.sg1.select, root.sg1.`111`, root.sg1.`a"b'c```, root.sg1.a]
+ // [root.db1.select, root.db1.`111`, root.db1.`a"b'c```, root.db1.a]
// You could see that time series in dataSet are exactly the same as
// the initial String you used as path. Node names consist of digits or
contain special
// characters are quoted with ``, both in SQL statement and in header of
result dataset.
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppCommonConfig.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppCommonConfig.java
index cfdcce30c32..746f13f04c0 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppCommonConfig.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppCommonConfig.java
@@ -582,7 +582,6 @@ public class MppCommonConfig extends MppBaseConfig
implements CommonConfig {
@Override
public CommonConfig setDefaultDatabaseLevel(int defaultDatabaseLevel) {
setProperty("default_database_level",
String.valueOf(defaultDatabaseLevel));
-<<<<<<< refs/remotes/upstream/clean
return this;
}
@@ -619,8 +618,6 @@ public class MppCommonConfig extends MppBaseConfig
implements CommonConfig {
@Override
public CommonConfig setTrustStorePwd(String trustStorePwd) {
setProperty("trust_store_pwd", trustStorePwd);
-=======
->>>>>>> local
return this;
}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppSharedCommonConfig.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppSharedCommonConfig.java
index 9e72d5d9971..de15176c5f1 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppSharedCommonConfig.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/config/MppSharedCommonConfig.java
@@ -605,7 +605,6 @@ public class MppSharedCommonConfig implements CommonConfig {
public CommonConfig setDefaultDatabaseLevel(int defaultDatabaseLevel) {
dnConfig.setDefaultDatabaseLevel(defaultDatabaseLevel);
cnConfig.setDefaultDatabaseLevel(defaultDatabaseLevel);
-<<<<<<< refs/remotes/upstream/clean
return this;
}
@@ -620,8 +619,6 @@ public class MppSharedCommonConfig implements CommonConfig {
public CommonConfig setEnableInternalSSL(boolean enableInternalSSL) {
cnConfig.setEnableInternalSSL(enableInternalSSL);
dnConfig.setEnableInternalSSL(enableInternalSSL);
-=======
->>>>>>> local
return this;
}
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/GrafanaApiServiceIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/GrafanaApiServiceIT.java
index ee0ee073c96..7fcb0d325e4 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/GrafanaApiServiceIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/GrafanaApiServiceIT.java
@@ -140,7 +140,7 @@ public class GrafanaApiServiceIT {
try {
HttpPost httpPost = getHttpPost("http://127.0.0.1:" + port +
"/rest/v1/insertTablet");
String json =
-
"{\"timestamps\":[1635232143960,1635232153960],\"measurements\":[\"s4\",\"s5\"],\"dataTypes\":[\"INT32\",\"INT32\"],\"values\":[[11,2],[15,13]],\"isAligned\":false,\"deviceId\":\"root.sg25\"}";
+
"{\"timestamps\":[1635232143960,1635232153960],\"measurements\":[\"s4\",\"s5\"],\"dataTypes\":[\"INT32\",\"INT32\"],\"values\":[[11,2],[15,13]],\"isAligned\":false,\"deviceId\":\"root.db25\"}";
httpPost.setEntity(new StringEntity(json, Charset.defaultCharset()));
for (int i = 0; i < 30; i++) {
try {
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDatetimeFormatIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDatetimeFormatIT.java
index 68beb76121e..5f26d3d772d 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDatetimeFormatIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDatetimeFormatIT.java
@@ -121,16 +121,16 @@ public class IoTDBDatetimeFormatIT {
statement.execute("CREATE TIMESERIES root.db.d1.s2 WITH DATATYPE=DOUBLE,
ENCODING=PLAIN;");
- statement.execute("insert into root.sg.d1(time,s2) values
(1618283005586000, 8.76);");
- statement.execute("select * from root.sg.d1;");
- statement.execute("select * from root.sg.d1 where
time=53251-05-07T17:06:26.000+08:00");
+ statement.execute("insert into root.db.d1(time,s2) values
(1618283005586000, 8.76);");
+ statement.execute("select * from root.db.d1;");
+ statement.execute("select * from root.db.d1 where
time=53251-05-07T17:06:26.000+08:00");
} catch (SQLException e) {
e.printStackTrace();
fail();
}
try (Connection connection = EnvFactory.getEnv().getConnection();
Statement statement = connection.createStatement()) {
- statement.execute("insert into root.sg.d1(time,s2) values
(16182830055860000000, 8.76);");
+ statement.execute("insert into root.db.d1(time,s2) values
(16182830055860000000, 8.76);");
fail();
} catch (SQLException e) {
Assert.assertTrue(
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDeletionIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDeletionIT.java
index 56215b63c48..fc976d5c95f 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDeletionIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDeletionIT.java
@@ -385,14 +385,10 @@ public class IoTDBDeletionIT {
statement.execute(
"INSERT INTO root.ln10.wf01.wt01(Time,status) VALUES (2022-10-11
10:20:50,true),(2022-10-11 10:20:51,true);");
statement.execute(
-<<<<<<< refs/remotes/upstream/clean
- "create timeseries root.sg10.wf01.wt01.status with
datatype=BOOLEAN,encoding=PLAIN;");
-=======
- "create timeseries root.db.wf01.wt01.status with
datatype=BOOLEAN,encoding=PLAIN;");
->>>>>>> local
+ "create timeseries root.db10.wf01.wt01.status with
datatype=BOOLEAN,encoding=PLAIN;");
statement.execute(
- "DELETE FROM root.ln10.wf01.wt01.status,root.sg.wf01.wt01.status
WHERE time >2022-10-11 10:20:50;");
+ "DELETE FROM root.ln10.wf01.wt01.status,root.db.wf01.wt01.status
WHERE time >2022-10-11 10:20:50;");
try (ResultSet resultSet = statement.executeQuery("select ** from
root.ln10")) {
int cnt = 0;
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBExampleIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBExampleIT.java
index 32a33c322c2..1afa03a4ec9 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBExampleIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBExampleIT.java
@@ -55,19 +55,11 @@ public class IoTDBExampleIT {
try (Connection connection = EnvFactory.getEnv().getConnection();
Statement statement = connection.createStatement()) {
-<<<<<<< refs/remotes/upstream/clean
- statement.execute("CREATE DATABASE root.sg");
- try (ResultSet resultSet = statement.executeQuery("show databases
root.sg")) {
- if (resultSet.next()) {
- String databasePath =
resultSet.getString(ColumnHeaderConstant.DATABASE);
- Assert.assertEquals("root.sg", databasePath);
-=======
statement.execute("CREATE DATABASE root.db");
- try (ResultSet resultSet = statement.executeQuery("show databases")) {
+ try (ResultSet resultSet = statement.executeQuery("show databases
root.db")) {
if (resultSet.next()) {
- String storageGroupPath =
resultSet.getString(ColumnHeaderConstant.DATABASE);
- Assert.assertEquals("root.db", storageGroupPath);
->>>>>>> local
+ String databasePath =
resultSet.getString(ColumnHeaderConstant.DATABASE);
+ Assert.assertEquals("root.db", databasePath);
} else {
Assert.fail("This ResultSet is empty.");
}
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadLastCacheIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadLastCacheIT.java
index 3ca78f8843b..c9fd5889158 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadLastCacheIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadLastCacheIT.java
@@ -283,7 +283,7 @@ public class IoTDBLoadLastCacheIT {
@Test
public void testTableModelLoadWithLastCache() throws Exception {
- final String database = SchemaConfig.DATABASE_0;
+ final String database = SchemaConfig.DATABASE;
final String table = SchemaConfig.TABLE_0;
final String measurement =
SchemaConfig.MEASUREMENT_00.getMeasurementName();
@@ -581,15 +581,10 @@ public class IoTDBLoadLastCacheIT {
private static class SchemaConfig {
-<<<<<<< refs/remotes/upstream/clean
- private static final String DATABASE_0 = "db";
+ private static final String DATABASE = "db";
private static final String TABLE_0 = "test";
- private static final String STORAGE_GROUP_0 = "root.sg.test_0";
- private static final String STORAGE_GROUP_1 = "root.sg.test_1";
-=======
private static final String DATABASE_0 = "root.db.test_0";
private static final String DATABASE_1 = "root.db.test_1";
->>>>>>> local
// device 0, nonaligned, sg 0
private static final String DEVICE_0 = "root.db.test_0.d_0";
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileIT.java
index 022aabae759..6bc018bf7a8 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileIT.java
@@ -1059,50 +1059,6 @@ public class IoTDBLoadTsFileIT {
}
@Test
-<<<<<<< refs/remotes/upstream/clean
-=======
- public void testAsyncLoadLocally() throws Exception {
- registerSchema();
-
- final long writtenPoint1;
- // device 0, device 1, sg 0
- try (final TsFileGenerator generator =
- new TsFileGenerator(new File(tmpDir, "1-0-0-0.tsfile"))) {
- generator.registerTimeseries(
- SchemaConfig.DEVICE_0,
Collections.singletonList(SchemaConfig.MEASUREMENT_00));
- generator.generateData(SchemaConfig.DEVICE_0, 1, PARTITION_INTERVAL /
10_000, false);
- writtenPoint1 = generator.getTotalNumber();
- }
-
- try (final Connection connection = EnvFactory.getEnv().getConnection();
- final Statement statement = connection.createStatement()) {
-
- statement.execute(
- String.format(
- "load \"%s\" with ('async'='true','database-level'='2')",
tmpDir.getAbsolutePath()));
-
- for (int i = 0; i < 20; i++) {
- try (final ResultSet resultSet =
- statement.executeQuery("select count(*) from root.** group by
level=1,2")) {
- if (resultSet.next()) {
- final long sg1Count =
resultSet.getLong("count(root.db.test_0.*.*)");
- Assert.assertEquals(writtenPoint1, sg1Count);
- } else {
- Assert.fail("This ResultSet is empty.");
- }
- } catch (final Throwable e) {
- if (i < 19) {
- Thread.sleep(1000);
- } else {
- throw e;
- }
- }
- }
- }
- }
-
- @Test
->>>>>>> local
@Ignore("Load with conversion is currently banned")
public void testLoadWithConvertOnTypeMismatchForTreeModel() throws Exception
{
@@ -1172,13 +1128,8 @@ public class IoTDBLoadTsFileIT {
}
private static class SchemaConfig {
-<<<<<<< refs/remotes/upstream/clean
- private static final String DATABASE_0 = "root.sg.test_0";
- private static final String DATABASE_1 = "root.sg.test_1";
-=======
private static final String DATABASE_0 = "root.db.test_0";
private static final String DATABASE_1 = "root.db.test_1";
->>>>>>> local
// device 0, nonaligned, sg 0
private static final String DEVICE_0 = "root.db.test_0.d_0";
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/CNPhysicalPlanGenerator.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/CNPhysicalPlanGenerator.java
index 5bb9a485ffe..f36bd5fffbf 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/CNPhysicalPlanGenerator.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/CNPhysicalPlanGenerator.java
@@ -76,11 +76,7 @@ import java.util.Stack;
import static org.apache.iotdb.commons.conf.IoTDBConstant.PATH_ROOT;
import static
org.apache.iotdb.commons.schema.SchemaConstant.DATABASE_MNODE_TYPE;
import static
org.apache.iotdb.commons.schema.SchemaConstant.INTERNAL_MNODE_TYPE;
-<<<<<<< refs/remotes/upstream/clean
import static org.apache.iotdb.commons.schema.SchemaConstant.TABLE_MNODE_TYPE;
-=======
-import static org.apache.iotdb.commons.utils.IOUtils.readAuthString;
->>>>>>> local
import static org.apache.iotdb.commons.utils.IOUtils.readString;
public class CNPhysicalPlanGenerator
@@ -444,11 +440,8 @@ public class CNPhysicalPlanGenerator
IConfigMNode internalMNode;
ConfigTableNode tableNode;
-<<<<<<< refs/remotes/upstream/clean
final Set<TsTable> tableSet = new HashSet<>();
-=======
->>>>>>> local
if (type == DATABASE_MNODE_TYPE) {
databaseMNode = deserializeDatabaseMNode(bufferedInputStream);
name = databaseMNode.getName();
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java
index 0ccd0d201b6..31ae35d0363 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java
@@ -96,12 +96,9 @@ import static
org.apache.iotdb.commons.schema.SchemaConstant.ALL_TEMPLATE;
import static
org.apache.iotdb.commons.schema.SchemaConstant.DATABASE_MNODE_TYPE;
import static
org.apache.iotdb.commons.schema.SchemaConstant.INTERNAL_MNODE_TYPE;
import static org.apache.iotdb.commons.schema.SchemaConstant.NON_TEMPLATE;
-<<<<<<< refs/remotes/upstream/clean
import static org.apache.iotdb.commons.schema.SchemaConstant.ROOT;
import static org.apache.iotdb.commons.schema.SchemaConstant.TABLE_MNODE_TYPE;
import static org.apache.iotdb.commons.schema.table.TsTable.TIME_COLUMN_NAME;
-=======
->>>>>>> local
// Since the ConfigMTree is all stored in memory, thus it is not restricted to
manage MNode through
// MTreeStore.
@@ -1121,22 +1118,12 @@ public class ConfigMTree {
}
private void serializeDatabaseNode(
-<<<<<<< refs/remotes/upstream/clean
- final IDatabaseMNode<IConfigMNode> storageGroupNode, final OutputStream
outputStream)
- throws IOException {
- serializeChildren(storageGroupNode.getAsMNode(), outputStream);
-
- ReadWriteIOUtils.write(DATABASE_MNODE_TYPE, outputStream);
- ReadWriteIOUtils.write(storageGroupNode.getName(), outputStream);
-
ReadWriteIOUtils.write(storageGroupNode.getAsMNode().getSchemaTemplateId(),
outputStream);
-=======
- IDatabaseMNode<IConfigMNode> databaseNode, OutputStream outputStream)
throws IOException {
+ final IDatabaseMNode<IConfigMNode> databaseNode, final OutputStream
outputStream) throws IOException {
serializeChildren(databaseNode.getAsMNode(), outputStream);
ReadWriteIOUtils.write(DATABASE_MNODE_TYPE, outputStream);
ReadWriteIOUtils.write(databaseNode.getName(), outputStream);
ReadWriteIOUtils.write(databaseNode.getAsMNode().getSchemaTemplateId(),
outputStream);
->>>>>>> local
ThriftConfigNodeSerDeUtils.serializeTDatabaseSchema(
databaseNode.getAsMNode().getDatabaseSchema(), outputStream);
}
diff --git
a/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTreeTest.java
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTreeTest.java
index d70bc0d1ff7..b5138c1d75e 100644
---
a/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTreeTest.java
+++
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTreeTest.java
@@ -186,23 +186,22 @@ public class ConfigMTreeTest {
@Test
public void testIllegalStorageGroup() {
try {
- root.setStorageGroup(new PartialPath("root.\"sg.ln\""));
+ root.setStorageGroup(new PartialPath("root.\"db.ln\""));
} catch (final MetadataException e) {
- Assert.assertEquals("root.\"sg.ln\" is not a legal path",
e.getMessage());
+ Assert.assertEquals("root.\"db.ln\" is not a legal path",
e.getMessage());
}
}
@Test
public void testCountStorageGroup() throws MetadataException {
root.setStorageGroup(new PartialPath("1"));
- root.setStorageGroup(new PartialPath("root.a.sg1"));
- root.setStorageGroup(new PartialPath("root.a.b.sg1"));
+ root.setStorageGroup(new PartialPath("root.a.db1"));
+ root.setStorageGroup(new PartialPath("root.a.b.db1"));
root.setStorageGroup(new PartialPath("root.db2"));
- root.setStorageGroup(new PartialPath("root.a.sg2"));
+ root.setStorageGroup(new PartialPath("root.a.db2"));
root.setStorageGroup(new PartialPath("root.db3"));
- root.setStorageGroup(new PartialPath("root.a.b.sg3"));
+ root.setStorageGroup(new PartialPath("root.a.b.db3"));
-<<<<<<< refs/remotes/upstream/clean
assertEquals(7, root.getDatabaseNum(new PartialPath("root.**"),
ALL_MATCH_SCOPE, false, false));
assertEquals(3, root.getDatabaseNum(new PartialPath("root.*"),
ALL_MATCH_SCOPE, false, false));
assertEquals(
@@ -210,23 +209,13 @@ public class ConfigMTreeTest {
assertEquals(
2, root.getDatabaseNum(new PartialPath("root.*.*.*"), ALL_MATCH_SCOPE,
false, false));
assertEquals(
- 1, root.getDatabaseNum(new PartialPath("root.*.sg1"), ALL_MATCH_SCOPE,
false, false));
+ 1, root.getDatabaseNum(new PartialPath("root.*.db1"), ALL_MATCH_SCOPE,
false, false));
assertEquals(
- 2, root.getDatabaseNum(new PartialPath("root.**.sg1"),
ALL_MATCH_SCOPE, false, false));
+ 2, root.getDatabaseNum(new PartialPath("root.**.db1"),
ALL_MATCH_SCOPE, false, false));
assertEquals(
- 1, root.getDatabaseNum(new PartialPath("root.sg3"), ALL_MATCH_SCOPE,
false, false));
+ 1, root.getDatabaseNum(new PartialPath("root.db3"), ALL_MATCH_SCOPE,
false, false));
assertEquals(
2, root.getDatabaseNum(new PartialPath("root.*.b.*"), ALL_MATCH_SCOPE,
false, false));
-=======
- assertEquals(7, root.getDatabaseNum(new PartialPath("root.**"),
ALL_MATCH_SCOPE, false));
- assertEquals(3, root.getDatabaseNum(new PartialPath("root.*"),
ALL_MATCH_SCOPE, false));
- assertEquals(2, root.getDatabaseNum(new PartialPath("root.*.*"),
ALL_MATCH_SCOPE, false));
- assertEquals(2, root.getDatabaseNum(new PartialPath("root.*.*.*"),
ALL_MATCH_SCOPE, false));
- assertEquals(1, root.getDatabaseNum(new PartialPath("root.*.sg1"),
ALL_MATCH_SCOPE, false));
- assertEquals(2, root.getDatabaseNum(new PartialPath("root.**.sg1"),
ALL_MATCH_SCOPE, false));
- assertEquals(1, root.getDatabaseNum(new PartialPath("root.db3"),
ALL_MATCH_SCOPE, false));
- assertEquals(2, root.getDatabaseNum(new PartialPath("root.*.b.*"),
ALL_MATCH_SCOPE, false));
->>>>>>> local
}
@Test
@@ -272,14 +261,10 @@ public class ConfigMTreeTest {
public void testSerialization() throws Exception {
final PartialPath[] pathList =
new PartialPath[] {
-<<<<<<< refs/remotes/upstream/clean
new PartialPath("root.`root`"),
-=======
- new PartialPath("root.db"),
->>>>>>> local
- new PartialPath("root.a.sg"),
- new PartialPath("root.a.b.sg"),
- new PartialPath("root.a.a.b.sg")
+ new PartialPath("root.a.db"),
+ new PartialPath("root.a.b.db"),
+ new PartialPath("root.a.a.b.db")
};
for (int i = 0; i < pathList.length; i++) {
root.setStorageGroup(pathList[i]);
@@ -310,22 +295,22 @@ public class ConfigMTreeTest {
assertEquals(
3,
- newTree.getMatchedDatabases(new PartialPath("root.**.sg"),
ALL_MATCH_SCOPE, false).size());
+ newTree.getMatchedDatabases(new PartialPath("root.**.db"),
ALL_MATCH_SCOPE, false).size());
assertEquals(
2,
newTree
- .getMatchedDatabases(new PartialPath("root.**.b.sg"),
ALL_MATCH_SCOPE, false)
+ .getMatchedDatabases(new PartialPath("root.**.b.db"),
ALL_MATCH_SCOPE, false)
.size());
assertEquals(
1,
- newTree.getMatchedDatabases(new PartialPath("root.*.*.sg"),
ALL_MATCH_SCOPE, false).size());
+ newTree.getMatchedDatabases(new PartialPath("root.*.*.db"),
ALL_MATCH_SCOPE, false).size());
assertEquals(
3, newTree.getMatchedDatabases(new PartialPath("root.a"),
ALL_MATCH_SCOPE, true).size());
assertEquals(
1, newTree.getMatchedDatabases(new PartialPath("root.a.b"),
ALL_MATCH_SCOPE, true).size());
assertEquals(
1,
- newTree.getMatchedDatabases(new PartialPath("root.a.b.sg"),
ALL_MATCH_SCOPE, true).size());
+ newTree.getMatchedDatabases(new PartialPath("root.a.b.db"),
ALL_MATCH_SCOPE, true).size());
}
@Test
@@ -334,10 +319,10 @@ public class ConfigMTreeTest {
final PartialPath[] pathList =
new PartialPath[] {
- new PartialPath("root.sg"),
- new PartialPath("root.a.sg"),
- new PartialPath("root.a.b.sg"),
- new PartialPath("root.a.a.b.sg")
+ new PartialPath("root.db"),
+ new PartialPath("root.a.db"),
+ new PartialPath("root.a.b.db"),
+ new PartialPath("root.a.a.b.db")
};
for (int i = 0; i < pathList.length; i++) {
@@ -384,22 +369,22 @@ public class ConfigMTreeTest {
assertEquals(
3,
- newTree.getMatchedDatabases(new PartialPath("root.**.sg"),
ALL_MATCH_SCOPE, false).size());
+ newTree.getMatchedDatabases(new PartialPath("root.**.db"),
ALL_MATCH_SCOPE, false).size());
assertEquals(
2,
newTree
- .getMatchedDatabases(new PartialPath("root.**.b.sg"),
ALL_MATCH_SCOPE, false)
+ .getMatchedDatabases(new PartialPath("root.**.b.db"),
ALL_MATCH_SCOPE, false)
.size());
assertEquals(
1,
- newTree.getMatchedDatabases(new PartialPath("root.*.*.sg"),
ALL_MATCH_SCOPE, false).size());
+ newTree.getMatchedDatabases(new PartialPath("root.*.*.db"),
ALL_MATCH_SCOPE, false).size());
assertEquals(
3, newTree.getMatchedDatabases(new PartialPath("root.a"),
ALL_MATCH_SCOPE, true).size());
assertEquals(
1, newTree.getMatchedDatabases(new PartialPath("root.a.b"),
ALL_MATCH_SCOPE, true).size());
assertEquals(
1,
- newTree.getMatchedDatabases(new PartialPath("root.a.b.sg"),
ALL_MATCH_SCOPE, true).size());
+ newTree.getMatchedDatabases(new PartialPath("root.a.b.db"),
ALL_MATCH_SCOPE, true).size());
for (int i = 0; i < pathList.length; i++) {
final List<TsTable> tables =
newTree.getAllUsingTablesUnderSpecificDatabase(pathList[i]);
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/impl/SchemaRegionMemoryImpl.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/impl/SchemaRegionMemoryImpl.java
index fbbd3155070..74ec5d87bf2 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/impl/SchemaRegionMemoryImpl.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/impl/SchemaRegionMemoryImpl.java
@@ -200,12 +200,9 @@ public class SchemaRegionMemoryImpl implements
ISchemaRegion {
private final String databaseDirPath;
private final String schemaRegionDirPath;
-<<<<<<< refs/remotes/upstream/clean
// For table model db: without "root."
// For tree model db: with "root."
-=======
->>>>>>> local
private final String databaseFullPath;
private final SchemaRegionId schemaRegionId;
@@ -227,11 +224,7 @@ public class SchemaRegionMemoryImpl implements
ISchemaRegion {
public SchemaRegionMemoryImpl(final ISchemaRegionParams schemaRegionParams)
throws MetadataException {
-<<<<<<< refs/remotes/upstream/clean
databaseFullPath = schemaRegionParams.getDatabase();
-=======
- databaseFullPath = schemaRegionParams.getDatabase().getFullPath();
->>>>>>> local
this.schemaRegionId = schemaRegionParams.getSchemaRegionId();
databaseDirPath = config.getSchemaDir() + File.separator +
databaseFullPath;
@@ -283,11 +276,7 @@ public class SchemaRegionMemoryImpl implements
ISchemaRegion {
tagManager = new TagManager(schemaRegionDirPath, regionStatistics);
mTree =
new MTreeBelowSGMemoryImpl(
-<<<<<<< refs/remotes/upstream/clean
PartialPath.getQualifiedDatabasePartialPath(databaseFullPath),
-=======
- new PartialPath(databaseFullPath),
->>>>>>> local
tagManager::readTags,
tagManager::readAttributes,
regionStatistics,
@@ -413,12 +402,7 @@ public class SchemaRegionMemoryImpl implements
ISchemaRegion {
databaseFullPath);
return idx;
} catch (final Exception e) {
-<<<<<<< refs/remotes/upstream/clean
- throw new IOException("Failed to parse " + databaseFullPath + "
mlog.bin", e);
-=======
- e.printStackTrace();
throw new IOException("Failed to parse " + databaseFullPath + "
mlog.bin for err:" + e);
->>>>>>> local
}
} else {
return 0;
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/snapshot/MemMTreeSnapshotUtil.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/snapshot/MemMTreeSnapshotUtil.java
index 7749d65aafe..71d78712afb 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/snapshot/MemMTreeSnapshotUtil.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/snapshot/MemMTreeSnapshotUtil.java
@@ -62,10 +62,7 @@ import static
org.apache.iotdb.commons.schema.SchemaConstant.INTERNAL_MNODE_TYPE
import static
org.apache.iotdb.commons.schema.SchemaConstant.LOGICAL_VIEW_MNODE_TYPE;
import static
org.apache.iotdb.commons.schema.SchemaConstant.MEASUREMENT_MNODE_TYPE;
import static
org.apache.iotdb.commons.schema.SchemaConstant.STORAGE_GROUP_ENTITY_MNODE_TYPE;
-<<<<<<< refs/remotes/upstream/clean
import static org.apache.iotdb.commons.schema.SchemaConstant.TABLE_MNODE_TYPE;
-=======
->>>>>>> local
import static
org.apache.iotdb.commons.schema.SchemaConstant.isStorageGroupType;
public class MemMTreeSnapshotUtil {
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SRStatementGenerator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SRStatementGenerator.java
index fd11448dc51..239b55b521b 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SRStatementGenerator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SRStatementGenerator.java
@@ -77,10 +77,7 @@ import static
org.apache.iotdb.commons.schema.SchemaConstant.INTERNAL_MNODE_TYPE
import static
org.apache.iotdb.commons.schema.SchemaConstant.LOGICAL_VIEW_MNODE_TYPE;
import static
org.apache.iotdb.commons.schema.SchemaConstant.MEASUREMENT_MNODE_TYPE;
import static
org.apache.iotdb.commons.schema.SchemaConstant.STORAGE_GROUP_ENTITY_MNODE_TYPE;
-<<<<<<< refs/remotes/upstream/clean
import static org.apache.iotdb.commons.schema.SchemaConstant.TABLE_MNODE_TYPE;
-=======
->>>>>>> local
import static
org.apache.iotdb.commons.schema.SchemaConstant.isStorageGroupType;
import static
org.apache.iotdb.db.schemaengine.schemaregion.tag.TagLogFile.parseByteBuffer;