You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2021/06/28 14:00:56 UTC

[iotdb] 01/01: [To rel/0.12] Fix DataMigrationExample OOM if migrate too many timeseries

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch DataMigration12
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit e4bf553232c3eb94f0b1e2b2a8efc7bbe7bdd850
Author: HTHou <hh...@outlook.com>
AuthorDate: Mon Jun 28 13:37:46 2021 +0800

    [To rel/0.12] Fix DataMigrationExample OOM if migrate too many timeseries
---
 .../src/main/java/org/apache/iotdb/DataMigrationExample.java      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/example/session/src/main/java/org/apache/iotdb/DataMigrationExample.java b/example/session/src/main/java/org/apache/iotdb/DataMigrationExample.java
index 4bfacfc..e880ba9 100644
--- a/example/session/src/main/java/org/apache/iotdb/DataMigrationExample.java
+++ b/example/session/src/main/java/org/apache/iotdb/DataMigrationExample.java
@@ -88,7 +88,7 @@ public class DataMigrationExample {
     int count = 0;
     while (schemaIter.next()) {
       count++;
-      Path currentPath = new Path(schemaIter.getString("timeseries"));
+      Path currentPath = new Path(schemaIter.getString("timeseries"), true);
       Future future =
           executorService.submit(
               new LoadThread(
@@ -121,14 +121,14 @@ public class DataMigrationExample {
       this.measurement = series.getMeasurement();
       this.dataType = dataType;
       this.series = series;
-      List<MeasurementSchema> schemaList = new ArrayList<>();
-      schemaList.add(new MeasurementSchema(measurement, dataType));
-      tablet = new Tablet(device, schemaList, 300000);
     }
 
     @Override
     public Void call() {
 
+      List<MeasurementSchema> schemaList = new ArrayList<>();
+      schemaList.add(new MeasurementSchema(measurement, dataType));
+      tablet = new Tablet(device, schemaList, 300000);
       SessionDataSetWrapper dataSet = null;
 
       try {