| 7023 | } |
| 7024 | |
| 7025 | func (p *TNodeLocations) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { |
| 7026 | _, size, err := iprot.ReadListBegin(ctx) |
| 7027 | if err != nil { |
| 7028 | return thrift.PrependError("error reading list begin: ", err) |
| 7029 | } |
| 7030 | tSlice := make([]*TDataNodeLocation, 0, size) |
| 7031 | p.DataNodeLocations = tSlice |
| 7032 | for i := 0; i < size; i ++ { |
| 7033 | _elem35 := &TDataNodeLocation{} |
| 7034 | if err := _elem35.Read(ctx, iprot); err != nil { |
| 7035 | return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem35), err) |
| 7036 | } |
| 7037 | p.DataNodeLocations = append(p.DataNodeLocations, _elem35) |
| 7038 | } |
| 7039 | if err := iprot.ReadListEnd(ctx); err != nil { |
| 7040 | return thrift.PrependError("error reading list end: ", err) |
| 7041 | } |
| 7042 | return nil |
| 7043 | } |
| 7044 | |
| 7045 | func (p *TNodeLocations) Write(ctx context.Context, oprot thrift.TProtocol) error { |
| 7046 | if err := oprot.WriteStructBegin(ctx, "TNodeLocations"); err != nil { |