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

Method Next

cmd/tempo-cli/cmd-convert-parquet-3to4.go:161–180  ·  view source on GitHub ↗
(_ context.Context)

Source from the content-addressed store, hash-verified

159}
160
161func (i *parquetIterator3) Next(_ context.Context) (common.ID, *tempopb.Trace, error) {
162 traces := []*vparquet3.Trace{{}}
163
164 i.i++
165 if i.i%1000 == 0 {
166 fmt.Println(i.i)
167 }
168
169 _, err := i.r.Read(traces)
170 if errors.Is(err, io.EOF) {
171 return nil, nil, io.EOF
172 }
173 if err != nil {
174 return nil, nil, err
175 }
176
177 pqTrace := traces[0]
178 pbTrace := vparquet3.ParquetTraceToTempopbTrace(i.m, pqTrace)
179 return pqTrace.TraceID, pbTrace, nil
180}
181
182func (i *parquetIterator3) Close() {
183 _ = i.r.Close()

Callers

nothing calls this directly

Calls 2

ReadMethod · 0.65

Tested by

no test coverage detected