Class NdJsonFormatReader
java.lang.Object
org.elasticsearch.xpack.esql.datasource.ndjson.NdJsonFormatReader
- All Implemented Interfaces:
Closeable,AutoCloseable,FormatReader,SegmentableFormatReader
FormatReader implementation for NDJSON files.
Implements
SegmentableFormatReader for intra-file parallel parsing.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.datasources.spi.FormatReader
FormatReader.SchemaResolution -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xpack.esql.datasources.spi.FormatReader
NO_LIMIT -
Constructor Summary
ConstructorsConstructorDescriptionNdJsonFormatReader(Settings settings, BlockFactory blockFactory, List<Attribute> resolvedSchema) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longfindNextRecordBoundary(InputStream stream) metadata(StorageObject object) read(StorageObject object, FormatReadContext context) withConfig(Map<String, Object> config) withSchema(List<Attribute> schema) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.datasources.spi.FormatReader
aggregatePushdownSupport, defaultErrorPolicy, defaultSchemaResolution, filterPushdownSupport, read, readAsync, schema, supportsNativeAsync, withPushedFilterMethods inherited from interface org.elasticsearch.xpack.esql.datasources.spi.SegmentableFormatReader
minimumSegmentSize
-
Field Details
-
SCHEMA_SAMPLE_SIZE_SETTING
- See Also:
-
DEFAULT_SCHEMA_SAMPLE_SIZE
public static final int DEFAULT_SCHEMA_SAMPLE_SIZE- See Also:
-
-
Constructor Details
-
NdJsonFormatReader
public NdJsonFormatReader(Settings settings, BlockFactory blockFactory, List<Attribute> resolvedSchema)
-
-
Method Details
-
withSchema
- Specified by:
withSchemain interfaceFormatReader
-
withConfig
- Specified by:
withConfigin interfaceFormatReader
-
metadata
- Specified by:
metadatain interfaceFormatReader- Throws:
IOException
-
read
public CloseableIterator<Page> read(StorageObject object, FormatReadContext context) throws IOException - Specified by:
readin interfaceFormatReader- Throws:
IOException
-
findNextRecordBoundary
- Specified by:
findNextRecordBoundaryin interfaceSegmentableFormatReader- Throws:
IOException
-
formatName
- Specified by:
formatNamein interfaceFormatReader
-
fileExtensions
- Specified by:
fileExtensionsin interfaceFormatReader
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-