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
BulkLoadFormatsubclass.
-
-
Constructor Summary
Constructors Constructor Description BulkLoadParser()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static BulkLoadParsercreateParser(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).
-
-
-
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.
-
-