title: Apache Beam Pipeline - Serialization problem
body: <p>My Beam pipeline seems to work properly, but produces a lot of warnings:</p>
  <pre><code>[direct-runner-worker] WARN org.apache.beam.sdk.util.MutationDetectors - Coder of type class org.apache.beam.sdk.coders.SerializableCoder has a #structuralValue method which does not return true when the encoding of the elements is equal. Element com.emarsys.dataflow.templates.MetricBundle@73d85187
  
  </code></pre>
  <p>The class looks like this:</p>
  <pre><code>@AllArgsConstructor
  @Data
  public class MetricBundle implements Serializable {
      private Long customerId;
      private String query;
      private Map&lt;PrimaryKey, Metric&gt; metrics;
  }
  </code></pre>
  <p>The problem is with the <code>Map</code>. <code>PrimaryKey</code> and <code>Metric</code> classes are composed of simple types, and implement the <code>Serializable</code> interface.</p>
  <p>The transform producing the <code>PCollection&lt;MetricBundle&gt;</code> is using <code>.setCoder(SerializableCoder.of(MetricBundle.class));</code></p>
  <p>Do I have to implement a custom coder in order to serialize <code>Map</code> properly?
  During testing, I found no conflicts in the result, all elements are handled properly.</p>