Class ParquetParser
java.lang.Object
org.apache.juneau.marshall.Context
org.apache.juneau.marshall.MarshallingContextable
org.apache.juneau.marshall.parser.Parser
org.apache.juneau.marshall.parser.InputStreamParser
org.apache.juneau.marshall.parquet.ParquetParser
- All Implemented Interfaces:
ParquetMetaProvider,ArrayRecordReadable,RecordReadable
public class ParquetParser
extends InputStreamParser
implements ParquetMetaProvider, RecordReadable, ArrayRecordReadable
Parses Apache Parquet binary data into bean collections.
Always returns a List<T>; each row in the file becomes one list element.
Media types:
Handles
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.juneau.marshall.parser.InputStreamParser
InputStreamParser.DefaultBuilderNested classes/interfaces inherited from class org.apache.juneau.marshall.parser.Parser
Parser.Null -
Field Summary
FieldsFields inherited from class org.apache.juneau.marshall.parser.Parser
autoCloseStreams, consumes, debugOutputLines, listener, nulls, trimStrings, unbufferedFields inherited from class org.apache.juneau.marshall.MarshallingContextable
marshallingContextFields inherited from class org.apache.juneau.marshall.Context
CONTEXT_APPLY_FILTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a builder from this context object.static ParquetParser.Buildercreate()Creates a new parser builder.Create a session builder based on the properties defined on this context.intReturns the maximum allowed wire-declared element count (row/value counts).intReturns the maximum allowed aggregate decompressed-byte total across every page read during a single parse.intReturns the maximum allowed size (in bytes) of the whole Parquet input buffered before parsing.intReturns the maximum allowed wire-declared length (in bytes) for a single Parquet page.Returns the Parquet-specific metadata on the specified bean property.getParquetClassMeta(ClassMeta<?> cm) Returns the Parquet-specific metadata on the specified class.booleanThe Parquet array-record cursor is buffered/RecordAdapter-backed, not O(1) streaming.booleanThe Parquet record cursor is buffered/RecordAdapter-backed, not O(1) streaming.readArrayRecords(Object input) Convenience delegator for the buffered array-elementRecordReaderusing default session arguments.readRecords(Object input) Convenience delegator for the whole-valueRecordReaderusing default session arguments.Methods inherited from class org.apache.juneau.marshall.parser.InputStreamParser
getBinaryFormat, getSession, isReaderParserMethods inherited from class org.apache.juneau.marshall.parser.Parser
canHandle, createParserBuilder, doRead, getDebugOutputLines, getListener, getMediaTypes, getNulls, getPrimaryMediaType, isAutoCloseStreams, isTrimStrings, isUnbuffered, properties, read, read, read, read, read, read, readArgs, readIntoCollection, readIntoMap, readWithOuterMethods inherited from class org.apache.juneau.marshall.MarshallingContextable
getDurationFormat, getMarshallingContext, getPeriodFormatMethods inherited from class org.apache.juneau.marshall.Context
createBuilder, getAnnotationProvider, init, isDebug, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.juneau.marshall.stream.ArrayRecordReadable
readArrayRecords
-
Field Details
-
DEFAULT
Default parser.
-
-
Constructor Details
-
ParquetParser
Constructor.- Parameters:
builder- The builder for this parser.
-
-
Method Details
-
create
Creates a new parser builder.- Returns:
- A new builder.
-
getMaxLength
Returns the maximum allowed wire-declared length (in bytes) for a single Parquet page.- Returns:
- The maximum length in bytes.
-
getMaxCount
Returns the maximum allowed wire-declared element count (row/value counts).- Returns:
- The maximum count.
-
getMaxInputLength
Returns the maximum allowed size (in bytes) of the whole Parquet input buffered before parsing.- Returns:
- The maximum input size in bytes.
-
getMaxDecompressedBytes
Returns the maximum allowed aggregate decompressed-byte total across every page read during a single parse.- Returns:
- The maximum aggregate decompressed-byte total.
-
copy
Description copied from class:ContextCreates a builder from this context object.Builders are used to define new contexts (e.g. serializers, parsers) based on existing configurations.
-
createSession
Description copied from class:ContextCreate a session builder based on the properties defined on this context.Use this method for creating sessions where you want to override basic settings. Otherwise, use
Context.getSession()directly.- Overrides:
createSessionin classInputStreamParser- Returns:
- A new session builder.
-
getParquetBeanPropertyMeta
Description copied from interface:ParquetMetaProviderReturns the Parquet-specific metadata on the specified bean property.- Specified by:
getParquetBeanPropertyMetain interfaceParquetMetaProvider- Parameters:
bpm- The bean property to return the metadata on.- Returns:
- The metadata.
-
getParquetClassMeta
Description copied from interface:ParquetMetaProviderReturns the Parquet-specific metadata on the specified class.- Specified by:
getParquetClassMetain interfaceParquetMetaProvider- Parameters:
cm- The class to return the metadata on.- Returns:
- The metadata.
-
readRecords
Convenience delegator for the whole-valueRecordReaderusing default session arguments. The real implementation lives onParquetParserSession.readRecords(Object).- Specified by:
readRecordsin interfaceRecordReadable- Parameters:
input- The input.- Returns:
- A new
RecordReadercursor. - Throws:
IOException- If a problem occurred opening the underlying input.
-
readArrayRecords
Convenience delegator for the buffered array-elementRecordReaderusing default session arguments. The real implementation lives onParquetParserSession.readArrayRecords(Object).- Specified by:
readArrayRecordsin interfaceArrayRecordReadable- Parameters:
input- The input.- Returns:
- A buffered
RecordReader. - Throws:
IOException- If a problem occurred reading the input.
-
isRecordStreaming
The Parquet record cursor is buffered/RecordAdapter-backed, not O(1) streaming.- Specified by:
isRecordStreamingin interfaceRecordReadable- Returns:
- Always
false .
-
isArrayRecordStreaming
The Parquet array-record cursor is buffered/RecordAdapter-backed, not O(1) streaming.- Specified by:
isArrayRecordStreamingin interfaceArrayRecordReadable- Returns:
- Always
false .
-