Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
753618b
Util classes for data loader
inv-jishnu Dec 4, 2024
8d39d02
Fix spotbug issue
inv-jishnu Dec 4, 2024
bf94c49
Removed error message and added core error
inv-jishnu Dec 6, 2024
47be388
Applied spotless
inv-jishnu Dec 6, 2024
913eb1c
Fixed unit test failures
inv-jishnu Dec 6, 2024
1f204b8
Merge branch 'master' into feat/data-loader/utils
ypeckstadt Dec 11, 2024
6cfa83a
Basic data import enum and exception
inv-jishnu Dec 11, 2024
d381b2b
Removed exception class for now
inv-jishnu Dec 11, 2024
67f2474
Added DECIMAL_FORMAT
inv-jishnu Dec 12, 2024
14e3593
Path util class updated
inv-jishnu Dec 12, 2024
a096d51
Feedback changes
inv-jishnu Dec 13, 2024
dbf1940
Merge branch 'master' into feat/data-loader/utils
ypeckstadt Dec 13, 2024
cd8add9
Merge branch 'master' into feat/data-loader/utils
ypeckstadt Dec 16, 2024
52890c8
Changes
inv-jishnu Dec 16, 2024
5114639
Merge branch 'master' into feat/data-loader/import-data-1
inv-jishnu Dec 17, 2024
4f9cd75
Merge branch 'feat/data-loader/utils' into feat/data-loader/scaladb-dao
inv-jishnu Dec 17, 2024
1997eb8
Added ScalarDB Dao
inv-jishnu Dec 17, 2024
91e6310
Merge branch 'master' into feat/data-loader/scaladb-dao
inv-jishnu Dec 17, 2024
8a7338b
Remove unnecessary files
inv-jishnu Dec 17, 2024
2b52eeb
Initial commit [skip ci]
inv-jishnu Dec 17, 2024
e206073
Changes
inv-jishnu Dec 17, 2024
26d3144
Changes
inv-jishnu Dec 18, 2024
b86487d
spotbugs exclude
inv-jishnu Dec 18, 2024
818a2b4
spotbugs exclude -2
inv-jishnu Dec 18, 2024
90c4105
Added a file [skip ci]
inv-jishnu Dec 18, 2024
3d5d3e0
Added unit test files [skip ci]
inv-jishnu Dec 18, 2024
6495202
Spotbug fixes
inv-jishnu Dec 19, 2024
90abd9e
Removed use of List.of to fix CI error
inv-jishnu Dec 19, 2024
ba2b3dd
Merged changes from master after resolving conflict
inv-jishnu Dec 19, 2024
b1b811b
Merge branch 'master' into feat/data-loader/metadata-service
inv-jishnu Dec 19, 2024
30db988
Applied spotless
inv-jishnu Dec 19, 2024
e9bb004
Added export options validator
inv-jishnu Dec 19, 2024
03324e1
Minor change in test
inv-jishnu Dec 19, 2024
d6aaf85
Applied spotless on CoreError
inv-jishnu Dec 19, 2024
4439dea
Make constructor private and improve javadocs
ypeckstadt Dec 19, 2024
ccb1ace
Improve javadocs
ypeckstadt Dec 20, 2024
a374f1a
Add private constructor to TableMetadataUtil
ypeckstadt Dec 20, 2024
a65c9b5
Apply spotless fix
ypeckstadt Dec 20, 2024
b3279ba
Fix the validation for partition and clustering keys
ypeckstadt Dec 23, 2024
78a8170
Fix spotless format
ypeckstadt Dec 23, 2024
acedabe
Partial feedback changes
inv-jishnu Dec 24, 2024
bf31a01
Data chunk and task result enums and dtos
inv-jishnu Dec 24, 2024
57cd330
Spotless applied
inv-jishnu Dec 24, 2024
7a39564
Changes
inv-jishnu Dec 26, 2024
a95a858
Resolved conflicts and merged latest changes from main
inv-jishnu Dec 26, 2024
093cb1d
Merge branch 'feat/data-loader/scaladb-dao' into feat/data-loader/imp…
inv-jishnu Dec 31, 2024
bfebd95
Merge branch 'feat/data-loader/metadata-service' into feat/data-loade…
inv-jishnu Dec 31, 2024
fd1c186
Control file files
inv-jishnu Dec 31, 2024
e2cc6ac
Added task files and dtos
inv-jishnu Jan 2, 2025
8c75b79
Fix unit test failure
inv-jishnu Jan 2, 2025
98618aa
Fix spot bugs failure
inv-jishnu Jan 2, 2025
c05286d
Merge branch 'feat/data-loader/scaladb-dao' into feat/data-loader/exp…
inv-jishnu Jan 2, 2025
0d3f79e
Export tasks added
inv-jishnu Jan 2, 2025
2365460
Merge branch 'feat/data-loader/metadata-service' into feat/data-loade…
inv-jishnu Jan 2, 2025
95022a9
Initial commit [skip ci]
inv-jishnu Jan 2, 2025
be4583c
Added transaction batch dtos
inv-jishnu Jan 3, 2025
89fea78
Added changes
inv-jishnu Jan 6, 2025
29a8c25
Fix spot less issue
inv-jishnu Jan 6, 2025
45adc95
Merge branch 'master' into feat/data-loader/export-tasks
inv-jishnu Jan 6, 2025
5568a7b
Merge branch 'feat/data-loader/import-utils-dtos' into feat/data-load…
inv-jishnu Jan 6, 2025
67dcb06
Merge branch 'master' into feat/data-loader/scaladb-dao
ypeckstadt Jan 7, 2025
2b58dcb
Initial commit
inv-jishnu Jan 8, 2025
cebb543
Merge branch 'master' into feat/data-loader/control-file
ypeckstadt Jan 8, 2025
8ecb39c
Changes -1
inv-jishnu Jan 9, 2025
c7ba6c8
Description added
inv-jishnu Jan 10, 2025
a566ef2
Code updated to support java 8
inv-jishnu Jan 13, 2025
f6c54ec
Updated test code to remove warning
inv-jishnu Jan 13, 2025
b92758c
Merged latest changes from main after resolving conflicts
inv-jishnu Jan 13, 2025
ee252d2
Added import manager
inv-jishnu Jan 14, 2025
90c4830
Changes added
inv-jishnu Jan 16, 2025
39c43de
Removed scalardb manager file
inv-jishnu Jan 16, 2025
3fe30a3
Merge branch 'master' into feat/data-loader/scaladb-dao
inv-jishnu Jan 20, 2025
4df4acd
Removed wildcard import
inv-jishnu Jan 20, 2025
53cd523
Merge branch 'master' into feat/data-loader/scaladb-dao
inv-jishnu Jan 23, 2025
f4f253e
Changes
inv-jishnu Jan 28, 2025
6d43bdc
Merge branch 'master' into feat/data-loader/scaladb-dao
inv-jishnu Jan 28, 2025
9c4ae23
Resolved conflicts and merge latest changes from master
inv-jishnu Jan 28, 2025
c9d01cb
Added default case in switch to resolve sportbugs warning
inv-jishnu Jan 28, 2025
50be8fd
Merge branch 'master' into feat/data-loader/import-process
inv-jishnu Jan 28, 2025
9224c7b
Merge branch 'master' into feat/data-loader/import-task
inv-jishnu Jan 28, 2025
5e61fd1
Merge branch 'master' into feat/data-loader/control-file
inv-jishnu Jan 28, 2025
f024670
Merge branch 'feat/data-loader/scaladb-dao' into feat/data-loader/con…
inv-jishnu Jan 29, 2025
d453e6c
Change wildcard imports
inv-jishnu Jan 30, 2025
39ecefe
Merge changes from master after resolving conflicts
inv-jishnu Jan 31, 2025
0984d51
Resolved conflicts and merged latest changes from main
inv-jishnu Feb 3, 2025
aadf3e1
Resolved conflicts and merged latest changes from master
inv-jishnu Feb 3, 2025
6998b68
Changes
inv-jishnu Feb 3, 2025
3c79ab6
Merged changes from master after resolving conflicts
inv-jishnu Feb 3, 2025
3ff03d9
Merge branch 'master' into feat/data-loader/export-tasks
inv-jishnu Feb 4, 2025
f3fb8d8
Merge branch 'master' into feat/data-loader/control-file
inv-jishnu Feb 4, 2025
6dd2ce2
Resolved conflicts and merged changes from branch feat/data-loader/co…
inv-jishnu Feb 4, 2025
1996865
Reverted new line removal
inv-jishnu Feb 4, 2025
8a1e6b9
Merge branch 'feat/data-loader/import-task' into feat/data-loader/imp…
inv-jishnu Feb 4, 2025
3187847
Changes to util function calls
inv-jishnu Feb 4, 2025
da2e241
Merge export tasks branch after resolving conflicts
inv-jishnu Feb 4, 2025
7d7ec91
Revert "Merge export tasks branch after resolving conflicts"
inv-jishnu Feb 4, 2025
31094b1
Resolved conflicts and merged latest changes from main
inv-jishnu Feb 7, 2025
aebcef6
Removing unwanted changes [skip ci]
inv-jishnu Feb 7, 2025
b5134b1
Changes
inv-jishnu Feb 10, 2025
285f51d
Java doc minor change [skip ci]
inv-jishnu Feb 10, 2025
01ce7d3
Merged changes from feat/data-loader/import-task after resolving conf…
inv-jishnu Feb 10, 2025
9cadea4
Constant file added
inv-jishnu Feb 10, 2025
40fde36
Changes from master merged after resolving conflicts
inv-jishnu Feb 13, 2025
0dd2956
Error messages and adding java docs
inv-jishnu Feb 13, 2025
9d3ffb1
Resolved conflicts and merged latest changes from master
inv-jishnu Feb 24, 2025
868d9b5
Column util correction
inv-jishnu Feb 26, 2025
e4cd7fe
Minor corrections
inv-jishnu Feb 26, 2025
d0a73a3
Changes
inv-jishnu Mar 4, 2025
bffa85b
gradle change reverted
inv-jishnu Mar 4, 2025
328afe5
Resolved conflicts and merged changes from master
inv-jishnu Mar 4, 2025
adc7e56
Spotless applied
inv-jishnu Mar 4, 2025
5b61876
Fixed unit test
inv-jishnu Mar 4, 2025
b9842be
Reverted try-catch changes
inv-jishnu Mar 5, 2025
16ae46d
Optimizations
inv-jishnu Mar 10, 2025
6b2536e
Error message changes and further optimizations
inv-jishnu Mar 10, 2025
6aea83c
Improve javadocs for the data loader import process
ypeckstadt Mar 17, 2025
851b691
Changes added
inv-jishnu Mar 25, 2025
c835730
Removed unused test util methods [skip ci]
inv-jishnu Mar 25, 2025
ff87a9a
Merge branch 'master' into feat/data-loader/import-process
inv-jishnu Mar 25, 2025
8f7adc8
Fixed spotbugs test issues
inv-jishnu Mar 25, 2025
3aff018
reader data updated [skip ci]
inv-jishnu Mar 25, 2025
35a758f
Merge branch 'master' into feat/data-loader/import-process
inv-jishnu Mar 25, 2025
24bfa37
Changes
inv-jishnu Apr 1, 2025
05ac8ff
Merge branch 'master' into feat/data-loader/import-process
inv-jishnu Apr 2, 2025
d9f239c
Thread exexcuter changes
inv-jishnu Apr 3, 2025
723bd51
Changed few values to be configurable
inv-jishnu Apr 3, 2025
a232df1
Renamed parameters from ScalarDB to ScalarDb
inv-jishnu Apr 3, 2025
d6d3cfb
Merged latest changes from master after resolving conflicts
inv-jishnu May 9, 2025
d6e2ee0
Removed unused files
inv-jishnu May 9, 2025
075c421
Changes
inv-jishnu May 9, 2025
2360a6c
Merge branch 'master' into feat/data-loader/update-name
inv-jishnu May 9, 2025
918170c
Merge branch 'master' into feat/data-loader/update-name
inv-jishnu May 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.scalar.db.dataloader.core;

/** The available modes a ScalarDB instance can run in */
public enum ScalarDBMode {
public enum ScalarDbMode {
STORAGE,
TRANSACTION
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.scalar.db.api.DistributedStorage;
import com.scalar.db.api.TableMetadata;
import com.scalar.db.dataloader.core.dataexport.producer.ProducerTaskFactory;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDBDao;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDbDao;
import com.scalar.db.dataloader.core.util.CsvUtil;
import com.scalar.db.transaction.consensuscommit.ConsensusCommitUtils;
import java.io.IOException;
Expand All @@ -13,7 +13,7 @@

public class CsvExportManager extends ExportManager {
public CsvExportManager(
DistributedStorage storage, ScalarDBDao dao, ProducerTaskFactory producerTaskFactory) {
DistributedStorage storage, ScalarDbDao dao, ProducerTaskFactory producerTaskFactory) {
super(storage, dao, producerTaskFactory);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import com.scalar.db.dataloader.core.dataexport.producer.ProducerTaskFactory;
import com.scalar.db.dataloader.core.dataexport.validation.ExportOptionsValidationException;
import com.scalar.db.dataloader.core.dataexport.validation.ExportOptionsValidator;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDBDao;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDBDaoException;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDbDao;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDbDaoException;
import com.scalar.db.dataloader.core.util.TableMetadataUtil;
import com.scalar.db.io.DataType;
import java.io.BufferedWriter;
Expand All @@ -33,7 +33,7 @@ public abstract class ExportManager {
private static final Logger logger = LoggerFactory.getLogger(ExportManager.class);

private final DistributedStorage storage;
private final ScalarDBDao dao;
private final ScalarDbDao dao;
private final ProducerTaskFactory producerTaskFactory;
private final Object lock = new Object();

Expand Down Expand Up @@ -115,7 +115,7 @@ public ExportReport startExport(
} finally {
bufferedWriter.flush();
}
} catch (ExportOptionsValidationException | IOException | ScalarDBDaoException e) {
} catch (ExportOptionsValidationException | IOException | ScalarDbDaoException e) {
logger.error("Error during export: {}", e.getMessage());
}
return exportReport;
Expand Down Expand Up @@ -215,11 +215,11 @@ private void handleTransactionMetadata(ExportOptions exportOptions, TableMetadat
* @param dao ScalarDB dao object
* @param storage distributed storage object
* @return created scanner
* @throws ScalarDBDaoException throws if any issue occurs in creating scanner object
* @throws ScalarDbDaoException throws if any issue occurs in creating scanner object
*/
private Scanner createScanner(
ExportOptions exportOptions, ScalarDBDao dao, DistributedStorage storage)
throws ScalarDBDaoException {
ExportOptions exportOptions, ScalarDbDao dao, DistributedStorage storage)
throws ScalarDbDaoException {
boolean isScanAll = exportOptions.getScanPartitionKey() == null;
if (isScanAll) {
return dao.createScanner(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import com.scalar.db.api.DistributedStorage;
import com.scalar.db.api.TableMetadata;
import com.scalar.db.dataloader.core.dataexport.producer.ProducerTaskFactory;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDBDao;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDbDao;
import java.io.IOException;
import java.io.Writer;

public class JsonExportManager extends ExportManager {
public JsonExportManager(
DistributedStorage storage, ScalarDBDao dao, ProducerTaskFactory producerTaskFactory) {
DistributedStorage storage, ScalarDbDao dao, ProducerTaskFactory producerTaskFactory) {
super(storage, dao, producerTaskFactory);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import com.scalar.db.api.DistributedStorage;
import com.scalar.db.api.TableMetadata;
import com.scalar.db.dataloader.core.dataexport.producer.ProducerTaskFactory;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDBDao;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDbDao;
import java.io.IOException;
import java.io.Writer;

public class JsonLineExportManager extends ExportManager {
public JsonLineExportManager(
DistributedStorage storage, ScalarDBDao dao, ProducerTaskFactory producerTaskFactory) {
DistributedStorage storage, ScalarDbDao dao, ProducerTaskFactory producerTaskFactory) {
super(storage, dao, producerTaskFactory);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.scalar.db.api.DistributedStorage;
import com.scalar.db.api.DistributedTransactionManager;
import com.scalar.db.api.TableMetadata;
import com.scalar.db.dataloader.core.ScalarDBMode;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDBDao;
import com.scalar.db.dataloader.core.ScalarDbMode;
import com.scalar.db.dataloader.core.dataimport.dao.ScalarDbDao;
import com.scalar.db.dataloader.core.dataimport.datachunk.ImportDataChunkStatus;
import com.scalar.db.dataloader.core.dataimport.processor.ImportProcessor;
import com.scalar.db.dataloader.core.dataimport.processor.ImportProcessorFactory;
Expand Down Expand Up @@ -43,7 +43,7 @@ public class ImportManager implements ImportEventListener {
@NonNull private final ImportOptions importOptions;
private final ImportProcessorFactory importProcessorFactory;
private final List<ImportEventListener> listeners = new ArrayList<>();
private final ScalarDBMode scalarDBMode;
private final ScalarDbMode scalarDbMode;
private final DistributedStorage distributedStorage;
private final DistributedTransactionManager distributedTransactionManager;
private final ConcurrentHashMap<Integer, ImportDataChunkStatus> importDataChunkStatusMap =
Expand All @@ -62,10 +62,10 @@ public class ImportManager implements ImportEventListener {
public ConcurrentHashMap<Integer, ImportDataChunkStatus> startImport() {
ImportProcessorParams params =
ImportProcessorParams.builder()
.scalarDBMode(scalarDBMode)
.scalarDbMode(scalarDbMode)
.importOptions(importOptions)
.tableMetadataByTableName(tableMetadata)
.dao(new ScalarDBDao())
.dao(new ScalarDbDao())
.distributedTransactionManager(distributedTransactionManager)
.distributedStorage(distributedStorage)
.tableColumnDataTypes(getTableColumnDataTypes())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
import org.slf4j.LoggerFactory;

/** The generic DAO that is used to scan ScalarDB data */
public class ScalarDBDao {
public class ScalarDbDao {

/* Class logger */
private static final Logger logger = LoggerFactory.getLogger(ScalarDBDao.class);
private static final Logger logger = LoggerFactory.getLogger(ScalarDbDao.class);
private static final String GET_COMPLETED_MSG = "GET completed for %s";
private static final String PUT_COMPLETED_MSG = "PUT completed for %s";
private static final String SCAN_START_MSG = "SCAN started...";
Expand All @@ -44,15 +44,15 @@ public class ScalarDBDao {
* @param clusteringKey Optional clustering key for get
* @param storage Distributed storage for ScalarDB connection that is running in storage mode.
* @return Optional get result
* @throws ScalarDBDaoException if something goes wrong while reading the data
* @throws ScalarDbDaoException if something goes wrong while reading the data
*/
public Optional<Result> get(
String namespace,
String table,
Key partitionKey,
Key clusteringKey,
DistributedStorage storage)
throws ScalarDBDaoException {
throws ScalarDbDaoException {

// Retrieving the key data for logging
String loggingKey = keysToString(partitionKey, clusteringKey);
Expand All @@ -63,7 +63,7 @@ public Optional<Result> get(
logger.info(String.format(GET_COMPLETED_MSG, loggingKey));
return result;
} catch (ExecutionException e) {
throw new ScalarDBDaoException("error GET " + loggingKey, e);
throw new ScalarDbDaoException("error GET " + loggingKey, e);
}
}

Expand All @@ -76,15 +76,15 @@ public Optional<Result> get(
* @param clusteringKey Optional clustering key for get
* @param transaction ScalarDB transaction instance
* @return Optional get result
* @throws ScalarDBDaoException if something goes wrong while reading the data
* @throws ScalarDbDaoException if something goes wrong while reading the data
*/
public Optional<Result> get(
String namespace,
String table,
Key partitionKey,
Key clusteringKey,
DistributedTransaction transaction)
throws ScalarDBDaoException {
throws ScalarDbDaoException {

Get get = createGetWith(namespace, table, partitionKey, clusteringKey);
// Retrieving the key data for logging
Expand All @@ -94,7 +94,7 @@ public Optional<Result> get(
logger.info(String.format(GET_COMPLETED_MSG, loggingKey));
return result;
} catch (CrudException e) {
throw new ScalarDBDaoException("error GET " + loggingKey, e.getCause());
throw new ScalarDbDaoException("error GET " + loggingKey, e.getCause());
}
}

Expand All @@ -107,7 +107,7 @@ public Optional<Result> get(
* @param clusteringKey Optional clustering key
* @param columns List of column values to be inserted or updated
* @param transaction ScalarDB transaction instance
* @throws ScalarDBDaoException if something goes wrong while executing the transaction
* @throws ScalarDbDaoException if something goes wrong while executing the transaction
*/
public void put(
String namespace,
Expand All @@ -116,13 +116,13 @@ public void put(
Key clusteringKey,
List<Column<?>> columns,
DistributedTransaction transaction)
throws ScalarDBDaoException {
throws ScalarDbDaoException {

Put put = createPutWith(namespace, table, partitionKey, clusteringKey, columns);
try {
transaction.put(put);
} catch (CrudException e) {
throw new ScalarDBDaoException(
throw new ScalarDbDaoException(
CoreError.DATA_LOADER_ERROR_CRUD_EXCEPTION.buildMessage(e.getMessage()), e);
}
logger.info(String.format(PUT_COMPLETED_MSG, keysToString(partitionKey, clusteringKey)));
Expand All @@ -137,7 +137,7 @@ public void put(
* @param clusteringKey Optional clustering key
* @param columns List of column values to be inserted or updated
* @param storage Distributed storage for ScalarDB connection that is running in storage mode
* @throws ScalarDBDaoException if something goes wrong while executing the transaction
* @throws ScalarDbDaoException if something goes wrong while executing the transaction
*/
public void put(
String namespace,
Expand All @@ -146,12 +146,12 @@ public void put(
Key clusteringKey,
List<Column<?>> columns,
DistributedStorage storage)
throws ScalarDBDaoException {
throws ScalarDbDaoException {
Put put = createPutWith(namespace, table, partitionKey, clusteringKey, columns);
try {
storage.put(put);
} catch (ExecutionException e) {
throw new ScalarDBDaoException(
throw new ScalarDbDaoException(
CoreError.DATA_LOADER_ERROR_CRUD_EXCEPTION.buildMessage(e.getMessage()), e);
}
logger.info(String.format(PUT_COMPLETED_MSG, keysToString(partitionKey, clusteringKey)));
Expand All @@ -169,7 +169,7 @@ public void put(
* @param limit Scan limit value
* @param storage Distributed storage for ScalarDB connection that is running in storage mode
* @return List of ScalarDB scan results
* @throws ScalarDBDaoException if scan fails
* @throws ScalarDbDaoException if scan fails
*/
public List<Result> scan(
String namespace,
Expand All @@ -180,7 +180,7 @@ public List<Result> scan(
List<String> projections,
int limit,
DistributedStorage storage)
throws ScalarDBDaoException {
throws ScalarDbDaoException {
// Create scan
Scan scan = createScan(namespace, table, partitionKey, range, sorts, projections, limit);

Expand All @@ -193,7 +193,7 @@ public List<Result> scan(
return allResults;
}
} catch (ExecutionException | IOException e) {
throw new ScalarDBDaoException(
throw new ScalarDbDaoException(
CoreError.DATA_LOADER_ERROR_SCAN.buildMessage(e.getMessage()), e);
}
}
Expand All @@ -211,7 +211,7 @@ public List<Result> scan(
* @param transaction Distributed Transaction manager for ScalarDB connection that is * running in
* transaction mode
* @return List of ScalarDB scan results
* @throws ScalarDBDaoException if scan fails
* @throws ScalarDbDaoException if scan fails
*/
public List<Result> scan(
String namespace,
Expand All @@ -222,7 +222,7 @@ public List<Result> scan(
List<String> projections,
int limit,
DistributedTransaction transaction)
throws ScalarDBDaoException {
throws ScalarDbDaoException {

// Create scan
Scan scan = createScan(namespace, table, partitionKey, range, sorts, projections, limit);
Expand All @@ -236,7 +236,7 @@ public List<Result> scan(
} catch (CrudException | NoSuchElementException e) {
// No such element Exception is thrown when the scan is done in transaction mode but
// ScalarDB is running in storage mode
throw new ScalarDBDaoException(
throw new ScalarDbDaoException(
CoreError.DATA_LOADER_ERROR_SCAN.buildMessage(e.getMessage()), e);
}
}
Expand All @@ -250,21 +250,21 @@ public List<Result> scan(
* @param limit Scan limit value
* @param storage Distributed storage for ScalarDB connection that is running in storage mode
* @return ScalarDB Scanner object
* @throws ScalarDBDaoException if scan fails
* @throws ScalarDbDaoException if scan fails
*/
public Scanner createScanner(
String namespace,
String table,
List<String> projectionColumns,
int limit,
DistributedStorage storage)
throws ScalarDBDaoException {
throws ScalarDbDaoException {
Scan scan =
createScan(namespace, table, null, null, new ArrayList<>(), projectionColumns, limit);
try {
return storage.scan(scan);
} catch (ExecutionException e) {
throw new ScalarDBDaoException(
throw new ScalarDbDaoException(
CoreError.DATA_LOADER_ERROR_SCAN.buildMessage(e.getMessage()), e);
}
}
Expand All @@ -281,7 +281,7 @@ public Scanner createScanner(
* @param limit Scan limit value
* @param storage Distributed storage for ScalarDB connection that is running in storage mode
* @return ScalarDB Scanner object
* @throws ScalarDBDaoException if scan fails
* @throws ScalarDbDaoException if scan fails
*/
public Scanner createScanner(
String namespace,
Expand All @@ -292,13 +292,13 @@ public Scanner createScanner(
@Nullable List<String> projectionColumns,
int limit,
DistributedStorage storage)
throws ScalarDBDaoException {
throws ScalarDbDaoException {
Scan scan =
createScan(namespace, table, partitionKey, scanRange, sortOrders, projectionColumns, limit);
try {
return storage.scan(scan);
} catch (ExecutionException e) {
throw new ScalarDBDaoException(
throw new ScalarDbDaoException(
CoreError.DATA_LOADER_ERROR_SCAN.buildMessage(e.getMessage()), e);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.scalar.db.dataloader.core.dataimport.dao;

/** A custom DAO exception that encapsulates errors thrown by ScalarDB operations */
public class ScalarDBDaoException extends Exception {
public class ScalarDbDaoException extends Exception {

/**
* Class constructor
*
* @param message error message
* @param cause reason for exception
*/
public ScalarDBDaoException(String message, Throwable cause) {
public ScalarDbDaoException(String message, Throwable cause) {
super(message, cause);
}
}
Loading