beam-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Go SDK: bad parameter type for reflect.methodValueCall: func(Record)
Date Mon, 18 Jun 2018 21:10:33 GMT
I have the following code:

type Record struct {
       Timestamp time.Time
       Payload   string

type processFn struct {
        // etc...

func (f *processFn) ProcessElement(ctx context.Context, data []byte, emit func(Record)) {
         // etc..
         // etc...

Which is eventually invoked as:
beam.ParDo(scope, &processFn{}, pcoll)

This seems to work fine using the direct runner until I add a map to the Record struct as

type Record struct {
        Timestamp    time.Time
        Payload      string
        Labels       map[string]string

Then I get the error mentioned in the subject line.

My questions are:
- Are maps illegal? What is a legal structure? or
- Is the feature yet to be implemented? or
- Am I doing something wrong? Am I failing to setup my pipeline correctly?
Thanks for your help.

View raw message