...
Package bz1
Overview ▹
Index ▹
Constants
DefaultChunkSize is the size of chunks read from the bz1 shard
const DefaultChunkSize = 1000
type Reader ¶
Reader is used to read all data from a bz1 shard.
type Reader struct {
// contains filtered or unexported fields
}
func NewReader ¶
func NewReader(path string, stats *stats.Stats, chunkSize int) *Reader
NewReader returns a reader for the bz1 shard at path.
func (*Reader) Close ¶
func (r *Reader) Close() error
Close closes the reader.
func (*Reader) Next ¶
func (r *Reader) Next() bool
Next returns whether there is any more data to be read.
func (*Reader) Open ¶
func (r *Reader) Open() error
Open opens the reader.
func (*Reader) Read ¶
func (r *Reader) Read() (string, []tsm1.Value, error)
Read returns the next chunk of data in the shard, converted to tsm1 values. Data is emitted completely for every field, in every series, before the next field is processed. Data from Read() adheres to the requirements for writing to tsm1 shards