org.apache.ignite.internal.processors.bulkload

## Class BulkLoadParser

- java.lang.Object
- - org.apache.ignite.internal.processors.bulkload.BulkLoadParser

Direct Known Subclasses:
  BulkLoadCsvParser

    public abstract class BulkLoadParser
    extends Object

Bulk load file format parser superclass + factory of known formats.

The parser processes a batch of input data and return a list of records.

The parser uses corresponding options from `BulkLoadFormat` subclass.

### Constructor Summary

Constructors
Constructor and Description
`BulkLoadParser()`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`static BulkLoadParser` `createParser(BulkLoadFormat format)` Creates a parser for a given format options.
`protected abstract Iterable<List<Object>>` `parseBatch(byte[] batchData, boolean isLastBatch)` Parses a batch of input data and returns a list of records parsed (in most cases this is a list of strings).

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BulkLoadParser

    public BulkLoadParser()

### Method Detail

#### parseBatch

    protected abstract Iterable<List<Object>> parseBatch(byte[] batchData,
                                                         boolean isLastBatch)
                                                  throws IgniteCheckedException

Parses a batch of input data and returns a list of records parsed (in most cases this is a list of strings).

Note that conversion between parsed and database table type is done by the other object (see `BulkLoadProcessor.dataConverter`) by the request processing code. This method is not obliged to do this conversion.

Parameters:
  `batchData` - Data from the current batch.
  `isLastBatch` - true if this is the last batch.
Returns:
  The list of records.
Throws:
  `IgniteCheckedException` - If any processing error occurs.

#### createParser

    public static BulkLoadParser createParser(BulkLoadFormat format)

Creates a parser for a given format options.

Parameters:
  `format` - The input format object.
Returns:
  The parser.
Throws:
  `IllegalArgumentException` - if the format is not known to the factory.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022