Compartir vía


BatchInserter Class

  • java.lang.Object
    • com.microsoft.azure.documentdb.bulkexecutor.internal.BatchOperator
      • com.microsoft.azure.documentdb.bulkexecutor.internal.BatchInserter

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<BulkImportFailure> 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 InsertMetrics that when awaited on operate on the next mini-batch to the document collection.

Methods inherited from com.microsoft.azure.documentdb.bulkexecutor.internal.BatchOperator

com.microsoft.azure.documentdb.bulkexecutor.internal.BatchOperator.miniBatchExecutionCallableIterator

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

badInputDocuments

public List 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<>> batchesToInsert, DocumentClient client, String bulkImportSprocLink, BulkImportStoredProcedureOptions options)

Parameters:

partitionKeyRangeId
batchesToInsert
client
bulkImportSprocLink
options

Method Details

getBadInputDocuments

public List getBadInputDocuments()

getDocumentsFailedToImport

public List getDocumentsFailedToImport()

getDocumentsFailedToImportDueToSplits

public List getDocumentsFailedToImportDueToSplits()

getNumberOfDocumentsImported

public int getNumberOfDocumentsImported()

getTotalRequestUnitsConsumed

public double getTotalRequestUnitsConsumed()

miniBatchExecutionCallableIterator

public Iterator<>> 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()

Applies to