recordwriter

package
v2.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultClusteredPathbuilder

func DefaultClusteredPathbuilder(record interface{}, partition int) string

DefaultClusteredPathbuilder builds a path from the GetPartitions + an incremntal partition id.

func DefaultPathbuilder

func DefaultPathbuilder(record interface{}) string

DefaultPathbuilder builds a path from the GetPartitions

func NewLineJSONClustered

func NewLineJSONClustered(
	it iterator.LesserIteratorClustered,
	wf writerfactory.WriterFactory,
	pathBuilder func(record interface{}, partition int) string,
) error

NewLineJSONClustered extracts possible partitions from the records yielded by the sorted iterator and writes them to the cache (and underlying writer) with the cluster-ids which guarrantees sorted order within each cluster Note the writers will NOT be closed by NewLineJSONClustered; that should be handled after it has been returned; as such it is usefull to use a writercache.Cache{}

func NewLineJSONPartitioned

func NewLineJSONPartitioned(
	it iterator.RecordIterator,
	wf writerfactory.WriterFactory,
	pathBuilder func(record interface{}) string,
) error

NewLineJSONPartitioned extracts possible partitions from the records yielded by the iterator and writes them to the cache (and underlying writer) under the key {record.GetPartitions().ToPartitionKey()}/unsorted_records_s{suffix}.json

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL