public class BatchInserter extends Object
| Modifier and Type | Field and Description |
|---|---|
List<Object> |
badInputDocuments
The list of documents which were bad input format and caused failure.
|
protected boolean |
cancel
Provides a mean to cancel Batch Operator from doing any more work.
|
protected com.microsoft.azure.documentdb.DocumentClient |
client
The document client to use.
|
AtomicInteger |
numberOfDocumentsImported
The count of documents bulk inserted by this batch inserter.
|
protected static com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected String |
partitionKeyRangeId
The index of the physical partition this batch operator is responsible for.
|
protected com.microsoft.azure.documentdb.RequestOptions |
requestOptions
Request options specifying the underlying partition key range id.
|
com.google.common.util.concurrent.AtomicDouble |
totalRequestUnitsConsumed
The total request units consumed by this batch inserter.
|
| Constructor and Description |
|---|
BatchInserter(String partitionKeyRangeId,
List<List<String>> batchesToInsert,
com.microsoft.azure.documentdb.DocumentClient client,
String bulkImportSprocLink,
BulkImportStoredProcedureOptions options,
Integer numberOfParallelTasks,
Integer writeThroughputBudgetPerCosmosPartition) |
| Modifier and Type | Method and Description |
|---|---|
List<Object> |
getBadInputDocuments() |
List<BulkImportFailure> |
getDocumentsFailedToImport() |
List<String> |
getDocumentsFailedToImportDueToSplits() |
int |
getNumberOfDocumentsImported() |
double |
getTotalRequestUnitsConsumed() |
Iterator<Callable<com.microsoft.azure.documentdb.bulkexecutor.internal.OperationMetrics>> |
miniBatchExecutionCallableIterator()
Gets a stream of tasks that return InsertMetrics that when awaited on operate on the next mini-batch to the document collection.
|
public AtomicInteger numberOfDocumentsImported
public com.google.common.util.concurrent.AtomicDouble totalRequestUnitsConsumed
public List<Object> badInputDocuments
protected static final com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected String partitionKeyRangeId
protected com.microsoft.azure.documentdb.DocumentClient client
protected volatile boolean cancel
protected com.microsoft.azure.documentdb.RequestOptions requestOptions
public BatchInserter(String partitionKeyRangeId, List<List<String>> batchesToInsert, com.microsoft.azure.documentdb.DocumentClient client, String bulkImportSprocLink, BulkImportStoredProcedureOptions options, Integer numberOfParallelTasks, Integer writeThroughputBudgetPerCosmosPartition)
public int getNumberOfDocumentsImported()
public double getTotalRequestUnitsConsumed()
public List<BulkImportFailure> getDocumentsFailedToImport()
public Iterator<Callable<com.microsoft.azure.documentdb.bulkexecutor.internal.OperationMetrics>> miniBatchExecutionCallableIterator()
Copyright © 2021. All rights reserved.