We need to use groupbykey to achive the functionality
KV < ID , < List of objects > > like
KV <1, < obj1,obj2 >>
Could you please tell if groupbykey works in Spark runner. According to capability matrix it is not supported but according the following link it is supported.
https://issues.apache.org/jira/browse/BEAM-799
Thanks