Documentation ¶
Index ¶
- func DefaultClusteredPathbuilder(record interface{}, partition int) string
- func DefaultPathbuilder(record interface{}) string
- func NewLineJSON(it iterator.RecordIterator, w io.Writer) error
- func NewLineJSONClustered(it iterator.LesserIteratorClustered, wf writerfactory.WriterFactory, ...) error
- func NewLineJSONPartitioned(it iterator.RecordIterator, wf writerfactory.WriterFactory, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClusteredPathbuilder ¶ added in v0.0.9
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 NewLineJSON ¶
func NewLineJSON( it iterator.RecordIterator, w io.Writer, ) error
NewLineJSON writes all the records from the records iterator as newline json to the writer. returns the first error from either the record iterator or the json encoding.
func NewLineJSONClustered ¶ added in v0.0.9
func NewLineJSONClustered( it iterator.LesserIteratorClustered, wf writerfactory.WriterFactory, pathBuilder func(record interface{}, partition int) string, ) error
NewLineJSONClustered extracts possible partitions from the records yeilded 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 yeilded 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.