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

Method Next

tempodb/encoding/vparquet3/block_iterator.go:72–88  ·  view source on GitHub ↗
(context.Context)

Source from the content-addressed store, hash-verified

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