my doubt is about if custom classes in Flink with Java needs to override or not hashCode()
and equals()
methods because I have read in this page that hashCode()
MUST never be implemented in distributed systems and Apache Flink is one of them.
Example: I have this class:
public class EventCounter {
public String Id;
public long count;
public Timestamp firstEvent;
public Timestamp lastEvent;
public Date date;
public EventCounter() {
}
}
Do I need to implement hashCode()
and equals()
for this kind of classes in Flink or it is better for performance if I let Flink manage those methods on it's own?
Kind regards!