Class ParquetSerializer
java.lang.Object
org.apache.juneau.marshall.Context
org.apache.juneau.marshall.MarshallingContextable
org.apache.juneau.marshall.MarshallingTraverseContext
org.apache.juneau.marshall.serializer.Serializer
org.apache.juneau.marshall.serializer.OutputStreamSerializer
org.apache.juneau.marshall.parquet.ParquetSerializer
- All Implemented Interfaces:
Function<Object,,byte[]> ThrowingFunction<Object,,byte[]> ParquetMetaProvider,ArrayRecordWritable,RecordWritable
public class ParquetSerializer
extends OutputStreamSerializer
implements ParquetMetaProvider, RecordWritable, ArrayRecordWritable
Serializes bean collections to Apache Parquet binary format.
Parquet is a columnar format; each bean is one row and each bean property is one column.
The serializer accepts a Collection, array, or single bean at the root.
Media types:
Produces
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.juneau.marshall.serializer.OutputStreamSerializer
OutputStreamSerializer.DefaultBuilderNested classes/interfaces inherited from class org.apache.juneau.marshall.serializer.Serializer
Serializer.Null -
Field Summary
FieldsFields inherited from class org.apache.juneau.marshall.serializer.Serializer
accept, addBeanTypes, addRootType, keepNullProperties, listener, nonDefault, produces, sortCollections, sortMaps, trimEmptyCollections, trimEmptyMaps, trimStringsFields 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 ParquetSerializer.Buildercreate()Creates a new builder.Create a session builder based on the properties defined on this context.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 writer is buffered/RecordAdapter-backed, not O(1) streaming.booleanThe Parquet record writer is buffered/RecordAdapter-backed, not O(1) streaming.writeArrayRecords(Object output) Convenience delegator for the buffered array-elementRecordWriterusing default session arguments.writeRecords(Object output) Convenience delegator for the whole-valueRecordWriterusing default session arguments.Methods inherited from class org.apache.juneau.marshall.serializer.OutputStreamSerializer
applyThrows, getBinaryFormat, getSession, isWriterSerializer, writeMethods inherited from class org.apache.juneau.marshall.serializer.Serializer
createSerializerBuilder, doWrite, forEachAcceptMediaType, getListener, getMediaTypeRanges, getPrimaryMediaType, getResponseContentType, getResponseHeaders, getUriContext, getUriRelativity, getUriResolution, isAddBeanTypes, isAddRootType, isKeepNullProperties, isNonDefault, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimStrings, properties, write, writeToStringMethods inherited from class org.apache.juneau.marshall.MarshallingTraverseContext
getDetectRecursions, getIgnoreRecursions, getInitialDepth, getMaxDepth, isDetectRecursions, isIgnoreRecursions, shouldDetectRecursionsMethods 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.ArrayRecordWritable
writeArrayRecordsMethods inherited from interface org.apache.juneau.commons.function.ThrowingFunction
apply
-
Field Details
-
DEFAULT
Default serializer.
-
-
Constructor Details
-
ParquetSerializer
Constructor.- Parameters:
builder- The builder.
-
-
Method Details
-
create
Creates a new builder.- Returns:
- A new builder.
-
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.
- Overrides:
copyin classSerializer- Returns:
- A new Builder object.
-
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 classOutputStreamSerializer- 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.
-
writeRecords
Convenience delegator for the whole-valueRecordWriterusing default session arguments. The real implementation lives onParquetSerializerSession.writeRecords(Object).- Specified by:
writeRecordsin interfaceRecordWritable- Parameters:
output- The output.- Returns:
- A new
RecordWriter. - Throws:
IOException- If a problem occurred opening the underlying output.
-
writeArrayRecords
Convenience delegator for the buffered array-elementRecordWriterusing default session arguments. The real implementation lives onParquetSerializerSession.writeArrayRecords(Object).- Specified by:
writeArrayRecordsin interfaceArrayRecordWritable- Parameters:
output- The output.- Returns:
- A new
RecordWriter. - Throws:
IOException- If a problem occurred opening the underlying output.
-
isRecordStreaming
The Parquet record writer is buffered/RecordAdapter-backed, not O(1) streaming.- Specified by:
isRecordStreamingin interfaceRecordWritable- Returns:
- Always
false .
-
isArrayRecordStreaming
The Parquet array-record writer is buffered/RecordAdapter-backed, not O(1) streaming.- Specified by:
isArrayRecordStreamingin interfaceArrayRecordWritable- Returns:
- Always
false .
-