BatchInserter Class
- java.
lang. Object - com.
microsoft. azure. documentdb. bulkexecutor. internal. BatchOperator - com.
microsoft. azure. documentdb. bulkexecutor. internal. BatchInserter
- com.
- com.
public class BatchInserter
extends com.microsoft.azure.documentdb.bulkexecutor.internal.BatchOperator
Field Summary
| Modifier and Type | Field and Description |
|---|---|
| java.util.List<java.lang.Object> |
badInputDocuments
The list of documents which were bad input format and caused failure. |
| java.util.concurrent.atomic.AtomicInteger |
numberOfDocumentsImported
The count of documents bulk inserted by this batch inserter. |
| com.google.common.util.concurrent.AtomicDouble |
totalRequestUnitsConsumed
The total request units consumed by this batch inserter. |
Constructor Summary
| Constructor | Description | |
|---|---|---|
| BatchInserter(String partitionKeyRangeId, List<List<String>> batchesToInsert, DocumentClient client, String bulkImportSprocLink, BulkImportStoredProcedureOptions options) | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| java.util.List<java.lang.Object> | getBadInputDocuments() |
|
java.util.List<Bulk |
getDocumentsFailedToImport() |
| java.util.List<java.lang.String> | getDocumentsFailedToImportDueToSplits() |
| int | getNumberOfDocumentsImported() |
| double | getTotalRequestUnitsConsumed() |
| java.util.Iterator<java.util.concurrent.Callable<com.microsoft.azure.documentdb.bulkexecutor.internal.OperationMetrics>> |
miniBatchExecutionCallableIterator()
Gets a stream of tasks that return Insert |
Methods inherited from com.microsoft.azure.documentdb.bulkexecutor.internal.BatchOperator
Methods inherited from java.lang.Object
Field Details
badInputDocuments
public List<Object> badInputDocuments
The list of documents which were bad input format and caused failure.
numberOfDocumentsImported
public AtomicInteger numberOfDocumentsImported
The count of documents bulk inserted by this batch inserter.
totalRequestUnitsConsumed
public AtomicDouble totalRequestUnitsConsumed
The total request units consumed by this batch inserter.
Constructor Details
BatchInserter
public BatchInserter(String partitionKeyRangeId, List<List<String>> batchesToInsert, DocumentClient client, String bulkImportSprocLink, BulkImportStoredProcedureOptions options)
Parameters:
Method Details
getBadInputDocuments
public List<Object> getBadInputDocuments()
getDocumentsFailedToImport
public List<BulkImportFailure> getDocumentsFailedToImport()
getDocumentsFailedToImportDueToSplits
public List<String> getDocumentsFailedToImportDueToSplits()
getNumberOfDocumentsImported
public int getNumberOfDocumentsImported()
getTotalRequestUnitsConsumed
public double getTotalRequestUnitsConsumed()
miniBatchExecutionCallableIterator
public Iterator<Callable<OperationMetrics>> miniBatchExecutionCallableIterator()
Gets a stream of tasks that return InsertMetrics that when awaited on operate on the next mini-batch to the document collection.
Overrides:
BatchInserter.miniBatchExecutionCallableIterator()