File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
data-loader/cli/src/main/java/com/scalar/db/dataloader/cli/command/dataexport Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,18 @@ public Integer call() throws Exception {
6464 validatePositiveValue (spec .commandLine (), maxThreads , DataLoaderError .INVALID_MAX_THREADS );
6565
6666 TransactionFactory transactionFactory = TransactionFactory .create (scalarDbPropertiesFilePath );
67- TableMetadataService metaDataService =
68- new TableMetadataService (transactionFactory .getTransactionAdmin ());
67+ TableMetadata tableMetadata ;
68+ try (com .scalar .db .api .DistributedTransactionAdmin admin =
69+ transactionFactory .getTransactionAdmin ()) {
70+ TableMetadataService metaDataService = new TableMetadataService (admin );
71+ tableMetadata = metaDataService .getTableMetadata (namespace , table );
72+ }
73+
6974 ScalarDbDao scalarDbDao = new ScalarDbDao ();
7075
7176 ExportManager exportManager =
7277 createExportManager (transactionFactory , scalarDbDao , outputFormat );
7378
74- TableMetadata tableMetadata = metaDataService .getTableMetadata (namespace , table );
75-
7679 Key partitionKey =
7780 partitionKeyValue != null ? getKeysFromList (partitionKeyValue , tableMetadata ) : null ;
7881 Key scanStartKey =
You can’t perform that action at this time.
0 commit comments