From 28453eb8fae2a49800258088a7876599cb766cb0 Mon Sep 17 00:00:00 2001 From: inv-jishnu <31100916+inv-jishnu@users.noreply.github.com> Date: Wed, 19 Nov 2025 11:18:42 +0530 Subject: [PATCH] Refactor Data Loader Import to Use DistributedTransactionManager for Storage Mode (#3147) Co-authored-by: Peckstadt Yves --- .../cli/command/dataexport/ExportCommand.java | 27 ++++- .../dataexport/ExportCommandOptions.java | 15 ++- .../cli/command/dataimport/ImportCommand.java | 38 ++----- .../command/dataexport/ExportCommandTest.java | 88 ++++++++++++++- .../core/dataexport/CsvExportManager.java | 24 +--- .../core/dataexport/ExportManager.java | 18 --- .../core/dataexport/ExportOptions.java | 1 - .../dataexport/producer/CsvProducerTask.java | 11 +- .../producer/JsonLineProducerTask.java | 11 +- .../dataexport/producer/JsonProducerTask.java | 11 +- .../dataexport/producer/ProducerTask.java | 9 -- .../producer/ProducerTaskFactory.java | 13 +-- .../core/dataimport/ImportManager.java | 7 +- .../core/dataimport/dao/ScalarDbDao.java | 103 +++++++----------- .../dao/ScalarDbStorageManager.java | 49 --------- .../dao/ScalarDbTransactionManager.java | 35 ------ .../dataimport/processor/ImportProcessor.java | 2 +- .../processor/ImportProcessorParams.java | 4 - .../dataimport/task/ImportStorageTask.java | 75 +++++++------ .../core/util/TableMetadataUtil.java | 38 ------- .../core/dataexport/CsvExportManagerTest.java | 11 +- .../dataexport/JsonExportManagerTest.java | 2 +- .../dataexport/JsonLineExportManagerTest.java | 2 +- .../producer/CsvProducerTaskTest.java | 18 ++- .../producer/JsonLineProducerTaskTest.java | 20 ++-- .../producer/JsonProducerTaskTest.java | 19 ++-- .../producer/ProducerTaskFactoryTest.java | 6 +- .../core/dataimport/ImportManagerTest.java | 13 +-- .../processor/CsvImportProcessorTest.java | 6 +- .../processor/ImportProcessorTest.java | 6 - .../processor/JsonImportProcessorTest.java | 6 +- .../JsonLinesImportProcessorTest.java | 6 +- 32 files changed, 265 insertions(+), 429 deletions(-) delete mode 100644 data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/dao/ScalarDbStorageManager.java delete mode 100644 data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataimport/dao/ScalarDbTransactionManager.java diff --git a/data-loader/cli/src/main/java/com/scalar/db/dataloader/cli/command/dataexport/ExportCommand.java b/data-loader/cli/src/main/java/com/scalar/db/dataloader/cli/command/dataexport/ExportCommand.java index 1a72319fc3..8331c45f87 100755 --- a/data-loader/cli/src/main/java/com/scalar/db/dataloader/cli/command/dataexport/ExportCommand.java +++ b/data-loader/cli/src/main/java/com/scalar/db/dataloader/cli/command/dataexport/ExportCommand.java @@ -55,6 +55,7 @@ public class ExportCommand extends ExportCommandOptions implements Callable