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

Method Next

cmd/tempo-cli/cmd-convert-parquet-4to5.go:140–159  ·  view source on GitHub ↗
(_ context.Context)

Source from the content-addressed store, hash-verified

138}
139
140func (i *parquetIterator4) Next(_ context.Context) (common.ID, *tempopb.Trace, error) {
141 traces := []*vparquet4.Trace{{}}
142
143 i.i++
144 if i.i%1000 == 0 {
145 fmt.Println(i.i)
146 }
147
148 _, err := i.r.Read(traces)
149 if errors.Is(err, io.EOF) {
150 return nil, nil, io.EOF
151 }
152 if err != nil {
153 return nil, nil, err
154 }
155
156 pqTrace := traces[0]
157 pbTrace := vparquet4.ParquetTraceToTempopbTrace(i.m, pqTrace)
158 return pqTrace.TraceID, pbTrace, nil
159}
160
161func (i *parquetIterator4) Close() {
162 _ = i.r.Close()

Callers

nothing calls this directly

Calls 2

ReadMethod · 0.65

Tested by

no test coverage detected