Class BulkLoadProcessor

  • All Implemented Interfaces:
    AutoCloseable

    public class BulkLoadProcessor
    extends Object
    implements AutoCloseable
    Bulk load (COPY) command processor used on server to keep various context data and process portions of input received from the client side.
    • Constructor Detail

      • BulkLoadProcessor

        public BulkLoadProcessor​(BulkLoadParser inputParser,
                                 IgniteClosureX<List<?>,​IgniteBiTuple<?,​?>> dataConverter,
                                 BulkLoadCacheWriter outputStreamer,
                                 RunningQueryManager runningQryMgr,
                                 long qryId,
                                 Tracing tracing)
        Creates bulk load processor.
        Parameters:
        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.
    • Method Detail

      • outputStreamer

        public BulkLoadCacheWriter outputStreamer()
        Returns the streamer that puts actual key/value into the cache.
        Returns:
        Streamer that puts actual key/value into the cache.
      • processBatch

        public void processBatch​(byte[] batchData,
                                 boolean isLastBatch)
                          throws IgniteCheckedException
        Processes the incoming batch and writes data to the cache by calling the data converter and output streamer.
        Parameters:
        batchData - Data from the current batch.
        isLastBatch - true if this is the last batch.
        Throws:
        IgniteIllegalStateException - when called after close().
        IgniteCheckedException
      • onError

        public void onError​(Exception failReason)
        Is called to notify processor, that bulk load execution, this processor is performing, failed with specified exception.
        Parameters:
        failReason - why current load failed.