Im trying to create an empty PCollection of a custom Object called Incident
public class Incident implements Serializable {
private Integer incidentId;
private String appId;
private Long minutes;
// getter setter
}
I was trying with the following:
PCollection<KV<String, Incident>> incidents = pipeline.apply("Create Empty Collection", Create.empty(TypeDescriptor.of(KV.class)))
.setTypeDescriptor(TypeDescriptor.of(KV.class, String.class, Incident.class));
But it gives me compilation error:
Cannot resolve method 'of(Class<KV>, Class<String>, Class<Incident>)'