public class BulkLoadProcessor extends Object implements AutoCloseable
| Constructor and Description |
|---|
BulkLoadProcessor(BulkLoadParser inputParser,
IgniteClosureX<List<?>,IgniteBiTuple<?,?>> dataConverter,
BulkLoadCacheWriter outputStreamer,
RunningQueryManager runningQryMgr,
Long qryId,
Tracing tracing)
Creates bulk load processor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Aborts processing and closes the underlying objects (
IgniteDataStreamer). |
void |
onError(Exception failReason)
Is called to notify processor, that bulk load execution, this processor is performing, failed with specified
exception.
|
BulkLoadCacheWriter |
outputStreamer()
Returns the streamer that puts actual key/value into the cache.
|
void |
processBatch(byte[] batchData,
boolean isLastBatch)
Processes the incoming batch and writes data to the cache by calling the data converter and output streamer.
|
public BulkLoadProcessor(BulkLoadParser inputParser, IgniteClosureX<List<?>,IgniteBiTuple<?,?>> dataConverter, BulkLoadCacheWriter outputStreamer, RunningQueryManager runningQryMgr, Long qryId, Tracing tracing)
inputParser - Parser of the input bytes.dataConverter - Converter, which transforms the list of strings parsed from the input stream to the
key+value entry to add to the cache.outputStreamer - Streamer that puts actual key/value into the cache.runningQryMgr - Running query manager.qryId - Running query id.tracing - Tracing processor.public BulkLoadCacheWriter outputStreamer()
public void processBatch(byte[] batchData,
boolean isLastBatch)
throws IgniteCheckedException
batchData - Data from the current batch.isLastBatch - true if this is the last batch.IgniteIllegalStateException - when called after close().IgniteCheckedExceptionpublic void onError(Exception failReason)
failReason - why current load failed.public void close()
throws Exception
IgniteDataStreamer).close in interface AutoCloseableException
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021