Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Apache-IoTDB-Client-CSharp-UserCase/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static async Task CreateTimeseries()
var session_pool = new SessionPool(host, port, pool_size);
await session_pool.Open(false);

await session_pool.DeleteStorageGroupAsync("root.ln.wf01.wt01");
await session_pool.DeleteDatabaseAsync("root.ln.wf01.wt01");
var status = await session_pool.CreateTimeSeries("root.ln.wf01.wt01.status", TSDataType.BOOLEAN, TSEncoding.PLAIN, Compressor.SNAPPY);
status = await session_pool.CreateTimeSeries("root.ln.wf01.wt01.temperature", TSDataType.DOUBLE, TSEncoding.PLAIN, Compressor.SNAPPY);
status = await session_pool.CreateTimeSeries("root.ln.wf01.wt01.hardware", TSDataType.TEXT, TSEncoding.PLAIN, Compressor.SNAPPY);
Expand Down
6 changes: 3 additions & 3 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ var tablet =

| api name | parameters | notes | use example |
| -------------------------- | ------------------------------------------------------------ | --------------------------- | ------------------------------------------------------------ |
| SetStorageGroup | string | set storage group | session_pool.SetStorageGroup("root.97209_TEST_CSHARP_CLIENT_GROUP_01") |
| SetStorageGroup | string | set storage group | session_pool.CreateDatabase("root.97209_TEST_CSHARP_CLIENT_GROUP_01") |
| CreateTimeSeries | string, TSDataType, TSEncoding, Compressor | create time series | session_pool.InsertTabletsAsync(tablets) |
| DeleteStorageGroupAsync | string | delete single storage group | session_pool.DeleteStorageGroupAsync("root.97209_TEST_CSHARP_CLIENT_GROUP_01") |
| DeleteStorageGroupsAsync | List<string> | delete storage group | session_pool.DeleteStorageGroupAsync("root.97209_TEST_CSHARP_CLIENT_GROUP") |
| DeleteStorageGroupAsync | string | delete single storage group | session_pool.DeleteDatabaseAsync("root.97209_TEST_CSHARP_CLIENT_GROUP_01") |
| DeleteStorageGroupsAsync | List<string> | delete storage group | session_pool.DeleteDatabaseAsync("root.97209_TEST_CSHARP_CLIENT_GROUP") |
| CreateMultiTimeSeriesAsync | List<string>, List<TSDataType> , List<TSEncoding> , List<Compressor> | create multi time series | session_pool.CreateMultiTimeSeriesAsync(ts_path_lst, data_type_lst, encoding_lst, compressor_lst); |
| DeleteTimeSeriesAsync | List<string> | delete time series | |
| DeleteTimeSeriesAsync | string | delete time series | |
Expand Down
68 changes: 34 additions & 34 deletions samples/Apache.IoTDB.Samples/SessionPoolTest.AlignedRecord.cs

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions samples/Apache.IoTDB.Samples/SessionPoolTest.AlignedTablet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public async Task TestInsertAlignedTablet()
if (debug) session_pool.OpenDebugMode();

System.Diagnostics.Debug.Assert(session_pool.IsOpen());
await session_pool.DeleteStorageGroupAsync(test_group_name);
var device_id = string.Format("{0}.{1}", test_group_name, test_device);
await session_pool.DeleteDatabaseAsync(test_database_name);
var device_id = string.Format("{0}.{1}", test_database_name, test_device);
var measurement_lst = new List<string>
{ test_measurements[1],
test_measurements[2],
Expand All @@ -53,7 +53,7 @@ public async Task TestInsertAlignedTablet()
status = await session_pool.InsertAlignedTabletAsync(tablet);
System.Diagnostics.Debug.Assert(status == 0);
var res = await session_pool.ExecuteQueryStatementAsync(
"select * from " + string.Format("{0}.{1}", test_group_name, test_device) + " where time<15");
"select * from " + string.Format("{0}.{1}", test_database_name, test_device) + " where time<15");
res.ShowTableNames();
while (res.HasNext()) Console.WriteLine(res.Next());

Expand Down Expand Up @@ -81,7 +81,7 @@ public async Task TestInsertAlignedTablet()
var end_ms = DateTime.Now.Ticks / 10000;
Console.WriteLine(string.Format("total tablet insert time is {0}", end_ms - start_ms));
res = await session_pool.ExecuteQueryStatementAsync(
"select * from " + string.Format("{0}.{1}", test_group_name, test_device));
"select * from " + string.Format("{0}.{1}", test_database_name, test_device));
res.ShowTableNames();
var res_count = 0;
while (res.HasNext())
Expand All @@ -93,7 +93,7 @@ public async Task TestInsertAlignedTablet()
await res.Close();
Console.WriteLine(res_count + " " + fetch_size * processed_size);
System.Diagnostics.Debug.Assert(res_count == fetch_size * processed_size);
status = await session_pool.DeleteStorageGroupAsync(test_group_name);
status = await session_pool.DeleteDatabaseAsync(test_database_name);
System.Diagnostics.Debug.Assert(status == 0);
await session_pool.Close();
Console.WriteLine("TestInsertAlignedTablet Passed!");
Expand All @@ -107,11 +107,11 @@ public async Task TestInsertAlignedTablets()
if (debug) session_pool.OpenDebugMode();

System.Diagnostics.Debug.Assert(session_pool.IsOpen());
await session_pool.DeleteStorageGroupAsync(test_group_name);
await session_pool.DeleteDatabaseAsync(test_database_name);
var device_id = new List<string>()
{
string.Format("{0}.{1}", test_group_name, test_devices[1]),
string.Format("{0}.{1}", test_group_name, test_devices[2])
string.Format("{0}.{1}", test_database_name, test_devices[1]),
string.Format("{0}.{1}", test_database_name, test_devices[2])
};
var measurements_lst = new List<List<string>>()
{
Expand Down Expand Up @@ -148,7 +148,7 @@ public async Task TestInsertAlignedTablets()
status = await session_pool.InsertAlignedTabletsAsync(tablets);
System.Diagnostics.Debug.Assert(status == 0);
var res = await session_pool.ExecuteQueryStatementAsync(
"select * from " + string.Format("{0}.{1}", test_group_name, test_devices[1]) + " where time<15");
"select * from " + string.Format("{0}.{1}", test_database_name, test_devices[1]) + " where time<15");
res.ShowTableNames();
while (res.HasNext()) Console.WriteLine(res.Next());

Expand All @@ -157,7 +157,7 @@ public async Task TestInsertAlignedTablets()
// tablets = new List<Tablet>() { };
for (var timestamp = 4; timestamp <= processed_size * fetch_size; timestamp++)
{
var local_device_id = string.Format("{0}.{1}", test_group_name, test_devices[1]);
var local_device_id = string.Format("{0}.{1}", test_database_name, test_devices[1]);
var local_measurements = new List<string>()
{test_measurements[1], test_measurements[2], test_measurements[3]};
var local_value = new List<List<object>>() { new() { "iotdb", true, (int)timestamp } };
Expand All @@ -174,7 +174,7 @@ public async Task TestInsertAlignedTablets()

Task.WaitAll(tasks.ToArray());
res = await session_pool.ExecuteQueryStatementAsync(
"select * from " + string.Format("{0}.{1}", test_group_name, test_devices[1]));
"select * from " + string.Format("{0}.{1}", test_database_name, test_devices[1]));
res.ShowTableNames();
var res_count = 0;
while (res.HasNext())
Expand All @@ -186,7 +186,7 @@ public async Task TestInsertAlignedTablets()
await res.Close();
Console.WriteLine(res_count + " " + fetch_size * processed_size);
System.Diagnostics.Debug.Assert(res_count == fetch_size * processed_size);
status = await session_pool.DeleteStorageGroupAsync(test_group_name);
status = await session_pool.DeleteDatabaseAsync(test_database_name);
System.Diagnostics.Debug.Assert(status == 0);
await session_pool.Close();
Console.WriteLine("TestInsertAlignedTablets Passed!");
Expand Down
Loading
Loading