Package org.apache.druid.frame.write
Class FrameWriters
java.lang.Object
org.apache.druid.frame.write.FrameWriters
Outward-facing utility methods for
FrameWriterFactory and FrameWriter users.-
Method Summary
Modifier and TypeMethodDescriptionstatic FrameWriterFactorymakeColumnBasedFrameWriterFactory(MemoryAllocatorFactory allocatorFactory, RowSignature signature, List<KeyColumn> sortColumns) static FrameWriterFactorymakeFrameWriterFactory(FrameType frameType, MemoryAllocatorFactory allocatorFactory, RowSignature signature, List<KeyColumn> sortColumns, boolean removeNullBytes) Creates aFrameWriterFactory.static RowSignaturesortableSignature(RowSignature signature, List<KeyColumn> keyColumns) Returns a copy of "signature" with columns rearranged so the provided sortColumns appear as a prefix.
-
Method Details
-
makeFrameWriterFactory
public static FrameWriterFactory makeFrameWriterFactory(FrameType frameType, MemoryAllocatorFactory allocatorFactory, RowSignature signature, List<KeyColumn> sortColumns, boolean removeNullBytes) Creates aFrameWriterFactory.- Parameters:
frameType- frame type to writeallocatorFactory- supplier of allocators, which ultimately determine frame size. Frames are closed and written once the allocator runs out of memory.signature- signature of the framessortColumns- sort columns for the frames. If nonempty,FrameSort.sort(org.apache.druid.frame.Frame, org.apache.druid.frame.read.FrameReader, java.util.List<org.apache.druid.frame.key.KeyColumn>)is used to sort the resulting frames.removeNullBytes- whether null bytes should be removed from strings as part of writing to the frame. Can only be set to "true" for row-based frame types.
-
makeColumnBasedFrameWriterFactory
public static FrameWriterFactory makeColumnBasedFrameWriterFactory(MemoryAllocatorFactory allocatorFactory, RowSignature signature, List<KeyColumn> sortColumns) -
sortableSignature
Returns a copy of "signature" with columns rearranged so the provided sortColumns appear as a prefix. Throws an error if any of the sortColumns are not present in the input signature, or if any of their types are unknown. This is useful because sort columns must appear
-