luoluoyuyu commented on code in PR #13352:
URL: https://github.com/apache/iotdb/pull/13352#discussion_r1737764534


##########
iotdb-client/cli/src/main/java/org/apache/iotdb/tool/ImportTsFile.java:
##########
@@ -371,9 +402,65 @@ public static void addNoResourceOrModsToQueue() throws 
InterruptedException {
   }
 
   public static void asyncImportTsFiles() {
+    if (isRemoteLoad) {
+      loadRemotely();
+    } else {
+      loadLocally();
+    }
+  }
+
+  public static void loadRemotely() {
+    final List<Thread> list = new ArrayList<>(threadNum);
+    for (int i = 0; i < threadNum; i++) {
+      final Thread thread = new Thread(() -> 
importTsFileRemotely(getRemoteLoadTsFile()));
+      thread.start();
+      list.add(thread);
+    }
+    list.forEach(
+        thread -> {
+          try {
+            thread.join();
+          } catch (final InterruptedException e) {
+            Thread.currentThread().interrupt();
+            ioTPrinter.println("importTsFile thread join interrupted: " + 
e.getMessage());

Review Comment:
   Hi @YC27  
   If a worker thread is interrupted, does the main thread need to be 
interrupted? If so, do other worker threads also need to be interrupted?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to