MCPcopy
hub / github.com/grafana/tempo / Next

Method Next

tempodb/encoding/vparquet5/block_iterator.go:76–92  ·  view source on GitHub ↗
(context.Context)

Source from the content-addressed store, hash-verified

74}
75
76func (i *rawIterator) Next(context.Context) (common.ID, parquet.Row, error) {
77 rows := []parquet.Row{i.pool.Get()}
78 n, err := i.r.ReadRows(rows)
79 if n > 0 {
80 return i.getTraceID(rows[0]), rows[0], nil
81 }
82
83 if errors.Is(err, io.EOF) {
84 i.pool.Put(rows[0])
85 return nil, nil, nil
86 }
87
88 if err != nil {
89 return nil, nil, fmt.Errorf("error iterating through block %s: %w", i.blockID, err)
90 }
91 return nil, nil, nil
92}
93
94func (i *rawIterator) peekNextID(context.Context) (common.ID, error) { // nolint:unused // this is required to satisfy the bookmarkIterator interface
95 return nil, util.ErrUnsupported

Callers

nothing calls this directly

Calls 3

getTraceIDMethod · 0.95
GetMethod · 0.65
PutMethod · 0.45

Tested by

no test coverage detected