SteveYurongSu commented on code in PR #13176:
URL: https://github.com/apache/iotdb/pull/13176#discussion_r1722641049


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java:
##########
@@ -319,6 +328,74 @@ protected String getClusterId() {
     return IoTDBDescriptor.getInstance().getConfig().getClusterId();
   }
 
+  @Override
+  protected TSStatus asyncLoadTsFile(final List<String> absolutePaths) throws 
Exception {
+    
moveToLoadTsFileDirBySequence.set(IOTDB_CONFIG.getLoadActiveListeningPipeDir());
+
+    for (String absolutePath : absolutePaths) {
+      final File sourceFile = new File(absolutePath);
+
+      // whether the move folder equal the listening folder
+      if (moveToLoadTsFileDirBySequence
+          .get()
+          .equals(sourceFile.getParentFile().getAbsolutePath())) {
+        continue;
+      }
+
+      moveFileWithMD5Check(sourceFile, new 
File(moveToLoadTsFileDirBySequence.get()));
+    }
+
+    return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
+  }
+
+  private static void moveFileWithMD5Check(final File sourceFile, final File 
targetDir)

Review Comment:
   Abstract them



-- 
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