public class ParallelScanTask
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
ParallelScanTask.SegmentScanState
Enumeration of the possible states of the scan on a segment.
|
Modifier and Type | Field and Description |
---|---|
private AmazonDynamoDB |
dynamo |
private java.util.concurrent.ExecutorService |
executorService |
private java.util.List<ScanRequest> |
parallelScanRequests
The list of hard copies of ScanRequest with different segment number.
|
private java.util.List<java.util.concurrent.Future<ScanResult>> |
segmentScanFutureTasks
Cache all the future tasks, so that we can extract the exception when
we see failed segment scan.
|
private java.util.List<ScanResult> |
segmentScanResults
Cache all the most recent ScanResult on each segment.
|
private java.util.List<ParallelScanTask.SegmentScanState> |
segmentScanStates
The current state of the scan on each segment.
|
private int |
totalSegments |
Constructor and Description |
---|
ParallelScanTask(AmazonDynamoDB dynamo,
java.util.List<ScanRequest> parallelScanRequests) |
ParallelScanTask(DynamoDBMapper mapper,
AmazonDynamoDB dynamo,
java.util.List<ScanRequest> parallelScanRequests)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<ScanResult> |
getNextBatchOfScanResults() |
(package private) java.lang.String |
getTableName() |
private void |
initSegmentScanStates() |
boolean |
isAllSegmentScanFinished() |
private java.util.List<ScanResult> |
marshalParallelScanResults() |
private ScanResult |
scanNextPageOfSegment(int currentSegment,
boolean checkLastEvaluatedKey) |
private void |
startScanNextPages() |
private final java.util.List<ScanRequest> parallelScanRequests
private final int totalSegments
private final java.util.List<java.util.concurrent.Future<ScanResult>> segmentScanFutureTasks
private final java.util.List<ScanResult> segmentScanResults
private final java.util.List<ParallelScanTask.SegmentScanState> segmentScanStates
private java.util.concurrent.ExecutorService executorService
private final AmazonDynamoDB dynamo
@Deprecated public ParallelScanTask(DynamoDBMapper mapper, AmazonDynamoDB dynamo, java.util.List<ScanRequest> parallelScanRequests)
ParallelScanTask(AmazonDynamoDB dynamo, java.util.List<ScanRequest> parallelScanRequests)
java.lang.String getTableName()
public boolean isAllSegmentScanFinished()
public java.util.List<ScanResult> getNextBatchOfScanResults() throws AmazonClientException
AmazonClientException
private void startScanNextPages()
private java.util.List<ScanResult> marshalParallelScanResults()
private ScanResult scanNextPageOfSegment(int currentSegment, boolean checkLastEvaluatedKey)
private void initSegmentScanStates()