Skip to content

Commit 735c47e

Browse files
committed
Updated javadoc
1 parent f4b0571 commit 735c47e

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

data-loader/core/src/main/java/com/scalar/db/dataloader/core/dataexport/ExportManager.java

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,23 @@ private void handleTransactionMetadata(ExportOptions exportOptions, TableMetadat
233233
}
234234
}
235235

236+
/**
237+
* Creates a ScalarDB {@link Scanner} instance based on the configured ScalarDB mode.
238+
*
239+
* <p>If the {@link ScalarDbMode} specified in {@code exportOptions} is {@code TRANSACTION}, a
240+
* scanner is created using the {@link DistributedTransactionManager}. Otherwise, a scanner is
241+
* created using the {@link DistributedStorage}.
242+
*
243+
* @param exportOptions Options containing configuration for the export operation, including the
244+
* ScalarDB mode
245+
* @param dao The {@link ScalarDbDao} used to access ScalarDB
246+
* @param storage The {@link DistributedStorage} instance used for storage-level operations
247+
* @param transactionManager The {@link DistributedTransactionManager} instance used for
248+
* transaction-level operations
249+
* @return A {@link Scanner} instance for reading data from ScalarDB
250+
* @throws ScalarDbDaoException If an error occurs while creating the scanner with the DAO
251+
* @throws TransactionException If an error occurs during transactional scanner creation
252+
*/
236253
private Scanner createScanner(
237254
ExportOptions exportOptions,
238255
ScalarDbDao dao,
@@ -246,13 +263,20 @@ private Scanner createScanner(
246263
}
247264

248265
/**
249-
* To create a scanner object
266+
* Creates a ScalarDB {@link Scanner} using the {@link DistributedStorage} interface based on the
267+
* scan configuration provided in {@link ExportOptions}.
250268
*
251-
* @param exportOptions export options
252-
* @param dao ScalarDB dao object
253-
* @param storage distributed storage object
254-
* @return created scanner
255-
* @throws ScalarDbDaoException throws if any issue occurs in creating scanner object
269+
* <p>If no partition key is specified in the {@code exportOptions}, a full table scan is
270+
* performed. Otherwise, a partition-specific scan is performed using the provided partition key,
271+
* optional scan range, and sort orders.
272+
*
273+
* @param exportOptions Options containing configuration for the export operation, including
274+
* namespace, table name, projection columns, limit, and scan parameters
275+
* @param dao The {@link ScalarDbDao} used to construct the scan operation
276+
* @param storage The {@link DistributedStorage} instance used to execute the scan
277+
* @return A {@link Scanner} instance for reading data from ScalarDB using storage-level
278+
* operations
279+
* @throws ScalarDbDaoException If an error occurs while creating the scanner
256280
*/
257281
private Scanner createScannerWithStorage(
258282
ExportOptions exportOptions, ScalarDbDao dao, DistributedStorage storage)
@@ -280,8 +304,11 @@ private Scanner createScannerWithStorage(
280304

281305
/**
282306
* Creates a {@link Scanner} using a {@link DistributedTransaction} based on the provided export
283-
* options. This method initiates a read-only transaction to ensure a consistent snapshot of the
284-
* data during scan.
307+
* options.
308+
*
309+
* <p>If no partition key is specified in the {@code exportOptions}, a full table scan is
310+
* performed. Otherwise, a partition-specific scan is performed using the provided partition key,
311+
* optional scan range, and sort orders.
285312
*
286313
* @param exportOptions Options specifying how to scan the table (e.g., partition key, range,
287314
* projection).

0 commit comments

Comments
 (0)