Skip to content

Commit bc3e539

Browse files
committed
update TSDB to IOTDB for iotAnyVector
1 parent ec5c132 commit bc3e539

File tree

4 files changed

+42
-42
lines changed

4 files changed

+42
-42
lines changed

test/com/xxdb/ConnectionPoolTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,7 +2294,7 @@ public void test_PartitionedTableAppender_allDataType_array_null() throws Except
22942294
@Test
22952295
public void Test_PartitionedTableAppender_iotAnyVector() throws Exception {
22962296
String script = "if(existsDatabase(\"dfs://testIOT_allDateType\")) dropDatabase(\"dfs://testIOT_allDateType\")\n" +
2297-
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2297+
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
22982298
" create table \"dfs://testIOT_allDateType\".\"pt\"(\n" +
22992299
" deviceId INT,\n" +
23002300
" timestamp TIMESTAMP,\n" +
@@ -2337,7 +2337,7 @@ public void Test_PartitionedTableAppender_iotAnyVector() throws Exception {
23372337
@Test
23382338
public void Test_PartitionedTableAppender_iotAnyVector_compress_true() throws Exception {
23392339
String script = "if(existsDatabase(\"dfs://testIOT_allDateType\")) dropDatabase(\"dfs://testIOT_allDateType\")\n" +
2340-
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2340+
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
23412341
" create table \"dfs://testIOT_allDateType\".\"pt\"(\n" +
23422342
" deviceId INT,\n" +
23432343
" timestamp TIMESTAMP,\n" +
@@ -2379,7 +2379,7 @@ public void Test_PartitionedTableAppender_iotAnyVector_compress_true() throws Ex
23792379
@Test
23802380
public void Test_PartitionedTableAppender_iotAnyVector_null() throws Exception {
23812381
String script = "if(existsDatabase(\"dfs://testIOT_allDateType\")) dropDatabase(\"dfs://testIOT_allDateType\")\n" +
2382-
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2382+
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
23832383
" create table \"dfs://testIOT_allDateType\".\"pt\"(\n" +
23842384
" deviceId INT,\n" +
23852385
" timestamp TIMESTAMP,\n" +
@@ -2434,7 +2434,7 @@ public void Test_PartitionedTableAppender_iotAnyVector_null() throws Exception {
24342434
@Test
24352435
public void Test_PartitionedTableAppender_iotAnyVector_null_compress_true() throws Exception {
24362436
String script = "if(existsDatabase(\"dfs://testIOT_allDateType\")) dropDatabase(\"dfs://testIOT_allDateType\")\n" +
2437-
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2437+
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
24382438
" create table \"dfs://testIOT_allDateType\".\"pt\"(\n" +
24392439
" deviceId INT,\n" +
24402440
" timestamp TIMESTAMP,\n" +
@@ -2488,7 +2488,7 @@ public void Test_PartitionedTableAppender_iotAnyVector_null_compress_true() thro
24882488
@Test
24892489
public void Test_PartitionedTableAppender_iotAnyVector_big_data() throws Exception {
24902490
String script = "if(existsDatabase(\"dfs://testIOT_allDateType1\")) dropDatabase(\"dfs://testIOT_allDateType1\")\n" +
2491-
" create database \"dfs://testIOT_allDateType1\" partitioned by RANGE(100000*(0..10)),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2491+
" create database \"dfs://testIOT_allDateType1\" partitioned by RANGE(100000*(0..10)),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
24922492
" create table \"dfs://testIOT_allDateType1\".\"pt\"(\n" +
24932493
" deviceId INT,\n" +
24942494
" timestamp TIMESTAMP,\n" +

test/com/xxdb/data/BasicIotAnyVectorTest.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public void test_BasicIotAnyVector_Scalar_null() throws IOException {
148148
@Test
149149
public void test_BasicIotAnyVector_2() throws IOException {
150150
String script = "if(existsDatabase(\"dfs://testIOT222\")) dropDatabase(\"dfs://testIOT222\")\n" +
151-
" create database \"dfs://testIOT222\" partitioned by HASH([INT, 40]),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
151+
" create database \"dfs://testIOT222\" partitioned by HASH([INT, 40]),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
152152
" create table \"dfs://testIOT222\".\"pt\"(\n" +
153153
" deviceId INT,\n" +
154154
" timestamp TIMESTAMP,\n" +
@@ -273,7 +273,7 @@ public void test_iotAnyVector_combine() throws IOException {
273273
@Test
274274
public void test_iotAnyVector_bigData() throws IOException {
275275
String script = "if(existsDatabase(\"dfs://testIOT123\")) dropDatabase(\"dfs://testIOT123\")\n" +
276-
" create database \"dfs://testIOT123\" partitioned by HASH([INT, 40]),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
276+
" create database \"dfs://testIOT123\" partitioned by HASH([INT, 40]),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
277277
" create table \"dfs://testIOT123\".\"pt\"(\n" +
278278
" deviceId INT,\n" +
279279
" timestamp TIMESTAMP,\n" +
@@ -300,9 +300,9 @@ public void test_iotAnyVector_bigData() throws IOException {
300300

301301
@Test
302302
public void test_iotAnyVector_allDateType() throws IOException {
303-
String script = "if(existsDatabase(\"dfs://testIOT333\")) dropDatabase(\"dfs://testIOT333\")\n" +
304-
" create database \"dfs://testIOT333\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
305-
" create table \"dfs://testIOT333\".\"pt\"(\n" +
303+
String script = "if(existsDatabase(\"dfs://testIOT\")) dropDatabase(\"dfs://testIOT\")\n" +
304+
" create database \"dfs://testIOT\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
305+
" create table \"dfs://testIOT\".\"pt\"(\n" +
306306
" deviceId INT,\n" +
307307
" timestamp TIMESTAMP,\n" +
308308
" location SYMBOL,\n" +
@@ -311,7 +311,7 @@ public void test_iotAnyVector_allDateType() throws IOException {
311311
"partitioned by deviceId, timestamp,\n" +
312312
"sortColumns=[`deviceId, `location, `timestamp],\n" +
313313
"latestKeyCache=true;\n" +
314-
"pt = loadTable(\"dfs://testIOT333\",\"pt\");\n" +
314+
"pt = loadTable(\"dfs://testIOT\",\"pt\");\n" +
315315
"t=table([1] as deviceId, [now()] as timestamp, [`loc1] as location, [char('Q')] as value)\n" +
316316
"pt.append!(t)\n" +
317317
"flushTSDBCache()\n" +
@@ -340,9 +340,9 @@ public void test_iotAnyVector_allDateType() throws IOException {
340340
"pt.append!(t)\n" +
341341
"flushTSDBCache()\n" ;
342342
conn.run(script);
343-
BasicTable entity1 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT333\", `pt) order by deviceId;");
343+
BasicTable entity1 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT\", `pt) order by deviceId;");
344344
Assert.assertEquals("['Q',233,-233,233121,true,233.33999634,233.34,loc1,AAA,bbb,xxx]", entity1.getColumn("value").getString());
345-
BasicIotAnyVector entity2 = (BasicIotAnyVector)conn.run(" exee=exec value from loadTable( \"dfs://testIOT333\", `pt) order by deviceId;exee");
345+
BasicIotAnyVector entity2 = (BasicIotAnyVector)conn.run(" exee=exec value from loadTable( \"dfs://testIOT\", `pt) order by deviceId;exee");
346346
Assert.assertEquals("['Q',233,-233,233121,true,233.33999634,233.34,loc1,AAA,bbb,xxx]", entity2.getString());
347347
BasicIotAnyVector BIV = (BasicIotAnyVector)entity1.getColumn("value");
348348
Assert.assertEquals("['Q',233,-233,233121,true,233.33999634,233.34,loc1,AAA,bbb,xxx]", BIV.getString());
@@ -372,9 +372,9 @@ public void test_iotAnyVector_allDateType() throws IOException {
372372

373373
@Test
374374
public void test_iotAnyVector_allDateType_null() throws IOException {
375-
String script = "if(existsDatabase(\"dfs://testIOT333\")) dropDatabase(\"dfs://testIOT333\")\n" +
376-
" create database \"dfs://testIOT333\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
377-
" create table \"dfs://testIOT333\".\"pt\"(\n" +
375+
String script = "if(existsDatabase(\"dfs://testIOT\")) dropDatabase(\"dfs://testIOT\")\n" +
376+
" create database \"dfs://testIOT\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
377+
" create table \"dfs://testIOT\".\"pt\"(\n" +
378378
" deviceId INT,\n" +
379379
" timestamp TIMESTAMP,\n" +
380380
" location SYMBOL,\n" +
@@ -383,7 +383,7 @@ public void test_iotAnyVector_allDateType_null() throws IOException {
383383
"partitioned by deviceId, timestamp,\n" +
384384
"sortColumns=[`deviceId, `location, `timestamp],\n" +
385385
"latestKeyCache=true;\n" +
386-
"pt = loadTable(\"dfs://testIOT333\",\"pt\");\n" +
386+
"pt = loadTable(\"dfs://testIOT\",\"pt\");\n" +
387387
"t=table([1] as deviceId, [now()] as timestamp, [`loc1] as location, [char(NULL)] as value)\n" +
388388
"pt.append!(t)\n" +
389389
"flushTSDBCache()\n" +
@@ -412,9 +412,9 @@ public void test_iotAnyVector_allDateType_null() throws IOException {
412412
"pt.append!(t)\n" +
413413
"flushTSDBCache()\n" ;
414414
conn.run(script);
415-
BasicTable entity1 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT333\", `pt) order by deviceId;");
415+
BasicTable entity1 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT\", `pt) order by deviceId;");
416416
Assert.assertEquals("[,,,,,,,,AAA,AAA,]", entity1.getColumn("value").getString());
417-
BasicIotAnyVector entity2 = (BasicIotAnyVector)conn.run(" exec value from loadTable( \"dfs://testIOT333\", `pt) order by deviceId;");
417+
BasicIotAnyVector entity2 = (BasicIotAnyVector)conn.run(" exec value from loadTable( \"dfs://testIOT\", `pt) order by deviceId;");
418418
Assert.assertEquals("[,,,,,,,,AAA,AAA,]", entity2.getString());
419419
BasicIotAnyVector BIV = (BasicIotAnyVector)entity1.getColumn("value");
420420
Assert.assertEquals("[,,,,,,,,AAA,AAA,]", BIV.getString());
@@ -443,9 +443,9 @@ public void test_iotAnyVector_allDateType_null() throws IOException {
443443
}
444444
@Test
445445
public void test_iotAnyVector_allDateType_upload() throws IOException {
446-
String script = "if(existsDatabase(\"dfs://testIOT333\")) dropDatabase(\"dfs://testIOT333\")\n" +
447-
" create database \"dfs://testIOT333\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
448-
" create table \"dfs://testIOT333\".\"pt\"(\n" +
446+
String script = "if(existsDatabase(\"dfs://testIOT\")) dropDatabase(\"dfs://testIOT\")\n" +
447+
" create database \"dfs://testIOT\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
448+
" create table \"dfs://testIOT\".\"pt\"(\n" +
449449
" deviceId INT,\n" +
450450
" timestamp TIMESTAMP,\n" +
451451
" location SYMBOL,\n" +
@@ -454,7 +454,7 @@ public void test_iotAnyVector_allDateType_upload() throws IOException {
454454
"partitioned by deviceId, timestamp,\n" +
455455
"sortColumns=[`deviceId, `location, `timestamp],\n" +
456456
"latestKeyCache=true;\n" +
457-
"pt = loadTable(\"dfs://testIOT333\",\"pt\");\n" +
457+
"pt = loadTable(\"dfs://testIOT\",\"pt\");\n" +
458458
"t=table([1] as deviceId, [now()] as timestamp, [`loc1] as location, [char('Q')] as value)\n" +
459459
"pt.append!(t)\n" +
460460
"flushTSDBCache()\n" +
@@ -483,7 +483,7 @@ public void test_iotAnyVector_allDateType_upload() throws IOException {
483483
"pt.append!(t)\n" +
484484
"flushTSDBCache()\n" ;
485485
conn.run(script);
486-
BasicTable entity1 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT333\", `pt) order by deviceId;");
486+
BasicTable entity1 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT\", `pt) order by deviceId;");
487487
Assert.assertEquals("['Q',233,-233,233121,true,233.33999634,233.34,loc1,AAA,bbb,xxx]", entity1.getColumn("value").getString());
488488
BasicIotAnyVector BIV = (BasicIotAnyVector)entity1.getColumn("value");
489489
System.out.println(BIV.getString());
@@ -497,9 +497,9 @@ public void test_iotAnyVector_allDateType_upload() throws IOException {
497497

498498
@Test
499499
public void test_iotAnyVector_allDateType_upload_null() throws IOException {
500-
String script = "if(existsDatabase(\"dfs://testIOT333\")) dropDatabase(\"dfs://testIOT333\")\n" +
501-
" create database \"dfs://testIOT333\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
502-
" create table \"dfs://testIOT333\".\"pt\"(\n" +
500+
String script = "if(existsDatabase(\"dfs://testIOT\")) dropDatabase(\"dfs://testIOT\")\n" +
501+
" create database \"dfs://testIOT\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
502+
" create table \"dfs://testIOT\".\"pt\"(\n" +
503503
" deviceId INT,\n" +
504504
" timestamp TIMESTAMP,\n" +
505505
" location SYMBOL,\n" +
@@ -508,7 +508,7 @@ public void test_iotAnyVector_allDateType_upload_null() throws IOException {
508508
"partitioned by deviceId, timestamp,\n" +
509509
"sortColumns=[`deviceId, `location, `timestamp],\n" +
510510
"latestKeyCache=true;\n" +
511-
"pt = loadTable(\"dfs://testIOT333\",\"pt\");\n" +
511+
"pt = loadTable(\"dfs://testIOT\",\"pt\");\n" +
512512
"t=table([1] as deviceId, [now()] as timestamp, [`loc1] as location, [char(NULL)] as value)\n" +
513513
"pt.append!(t)\n" +
514514
"flushTSDBCache()\n" +
@@ -537,7 +537,7 @@ public void test_iotAnyVector_allDateType_upload_null() throws IOException {
537537
"pt.append!(t)\n" +
538538
"flushTSDBCache()\n" ;
539539
conn.run(script);
540-
BasicTable entity1 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT333\", `pt) order by deviceId;");
540+
BasicTable entity1 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT\", `pt) order by deviceId;");
541541
Assert.assertEquals("[,,,,,,,,,AAA,AAA]", entity1.getColumn("value").getString());
542542
BasicIotAnyVector BIV = (BasicIotAnyVector)entity1.getColumn("value");
543543
System.out.println(BIV.getString());
@@ -563,7 +563,7 @@ public void test_iotAnyVector_allDateType_upload_null() throws IOException {
563563
System.out.println(entity33.getString());
564564
Assert.assertEquals("IOTANY", entity33.getColumn(0).getString(0));
565565

566-
BasicTable entity4 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT333\", `pt) order by deviceId limit 9 ;");
566+
BasicTable entity4 = (BasicTable)conn.run("select * from loadTable( \"dfs://testIOT\", `pt) order by deviceId limit 9 ;");
567567
System.out.println(entity4.getColumn("value"));
568568
BasicIotAnyVector entity44 = (BasicIotAnyVector)entity4.getColumn("value");
569569
Map<String, Entity> map2 = new HashMap<>();

test/com/xxdb/route/AutoFitTableAppenderTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ public void Test_AutoFitTableAppender_dateType_not_match() throws IOException {
24642464
@Test
24652465
public void Test_AutoFitTableAppender_iotAnyVector() throws IOException {
24662466
String script = "if(existsDatabase(\"dfs://testIOT_allDateType\")) dropDatabase(\"dfs://testIOT_allDateType\")\n" +
2467-
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2467+
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
24682468
" create table \"dfs://testIOT_allDateType\".\"pt\"(\n" +
24692469
" deviceId INT,\n" +
24702470
" timestamp TIMESTAMP,\n" +
@@ -2506,7 +2506,7 @@ public void Test_AutoFitTableAppender_iotAnyVector() throws IOException {
25062506
@Test
25072507
public void Test_AutoFitTableAppender_iotAnyVector_compress() throws IOException {
25082508
String script = "if(existsDatabase(\"dfs://testIOT_allDateType\")) dropDatabase(\"dfs://testIOT_allDateType\")\n" +
2509-
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2509+
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
25102510
" create table \"dfs://testIOT_allDateType\".\"pt\"(\n" +
25112511
" deviceId INT,\n" +
25122512
" timestamp TIMESTAMP,\n" +
@@ -2550,7 +2550,7 @@ public void Test_AutoFitTableAppender_iotAnyVector_compress() throws IOException
25502550
@Test
25512551
public void Test_AutoFitTableAppender_iotAnyVector_null() throws IOException {
25522552
String script = "if(existsDatabase(\"dfs://testIOT_allDateType\")) dropDatabase(\"dfs://testIOT_allDateType\")\n" +
2553-
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2553+
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
25542554
" create table \"dfs://testIOT_allDateType\".\"pt\"(\n" +
25552555
" deviceId INT,\n" +
25562556
" timestamp TIMESTAMP,\n" +
@@ -2603,7 +2603,7 @@ public void Test_AutoFitTableAppender_iotAnyVector_null() throws IOException {
26032603
@Test
26042604
public void Test_AutoFitTableAppender_iotAnyVector_null_compress_true() throws IOException {
26052605
String script = "if(existsDatabase(\"dfs://testIOT_allDateType\")) dropDatabase(\"dfs://testIOT_allDateType\")\n" +
2606-
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2606+
" create database \"dfs://testIOT_allDateType\" partitioned by VALUE(1..20),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
26072607
" create table \"dfs://testIOT_allDateType\".\"pt\"(\n" +
26082608
" deviceId INT,\n" +
26092609
" timestamp TIMESTAMP,\n" +
@@ -2658,7 +2658,7 @@ public void Test_AutoFitTableAppender_iotAnyVector_null_compress_true() throws I
26582658
@Test
26592659
public void Test_AutoFitTableUpsert_iotAnyVector_big_data() throws Exception {
26602660
String script = "if(existsDatabase(\"dfs://testIOT_allDateType1\")) dropDatabase(\"dfs://testIOT_allDateType1\")\n" +
2661-
" create database \"dfs://testIOT_allDateType1\" partitioned by RANGE(1000000*(0..10)),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='TSDB'\n" +
2661+
" create database \"dfs://testIOT_allDateType1\" partitioned by RANGE(1000000*(0..10)),RANGE(2020.01.01 2022.01.01 2025.01.01), engine='IOTDB'\n" +
26622662
" create table \"dfs://testIOT_allDateType1\".\"pt\"(\n" +
26632663
" deviceId INT,\n" +
26642664
" timestamp TIMESTAMP,\n" +

0 commit comments

Comments
 (0)