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

Method Next

tempodb/encoding/vparquet4/block_iterator.go:74–90  ·  view source on GitHub ↗
(context.Context)

Source from the content-addressed store, hash-verified

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