Package org.apache.druid.frame.write
Class FrameWriters
- java.lang.Object
-
- org.apache.druid.frame.write.FrameWriters
-
public class FrameWriters extends Object
Outward-facing utility methods forFrameWriterFactoryandFrameWriterusers.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FrameWriterFactorymakeFrameWriterFactory(FrameType frameType, MemoryAllocatorFactory allocatorFactory, RowSignature signature, List<KeyColumn> sortColumns)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 Detail
-
makeFrameWriterFactory
public static FrameWriterFactory makeFrameWriterFactory(FrameType frameType, MemoryAllocatorFactory allocatorFactory, RowSignature signature, List<KeyColumn> sortColumns)
Creates aFrameWriterFactory.- Parameters:
frameType- type of the framesallocatorFactory- 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.
-
sortableSignature
public static RowSignature sortableSignature(RowSignature signature, List<KeyColumn> keyColumns)
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
-
-