@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ControlMessage other = (ControlMessage) obj; if (version != other.version) { return false; } if (taskName != null ? !taskName.equals(other.getTaskName()) : other.taskName != null) { return false; } return true; } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; if (!super.equals(obj)) return false; final WatermarkMessage other = (WatermarkMessage) obj; if (timestamp != other.timestamp) { return false; } return true; } }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Long.hashCode(timestamp); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ControlMessage other = (ControlMessage) obj; if (version != other.version) { return false; } if (taskName != null ? !taskName.equals(other.getTaskName()) : other.taskName != null) { return false; } return true; } }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Long.hashCode(timestamp); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; if (!super.equals(obj)) return false; final WatermarkMessage other = (WatermarkMessage) obj; if (timestamp != other.timestamp) { return false; } return true; } }
void send(ControlMessage message, SystemStream systemStream, MessageCollector collector) { int partitionCount = getPartitionCount(systemStream); // We pick a partition based on topic hashcode to aggregate the control messages from upstream tasks // After aggregation the task will broadcast the results to other partitions int aggregatePartition = systemStream.getStream().hashCode() % partitionCount; LOG.debug(String.format("Send %s message from task %s to %s partition %s for aggregation", MessageType.of(message).name(), message.getTaskName(), systemStream, aggregatePartition)); OutgoingMessageEnvelope envelopeOut = new OutgoingMessageEnvelope(systemStream, aggregatePartition, null, message); collector.send(envelopeOut); }
void send(ControlMessage message, SystemStream systemStream, MessageCollector collector) { int partitionCount = getPartitionCount(systemStream); // We pick a partition based on topic hashcode to aggregate the control messages from upstream tasks // After aggregation the task will broadcast the results to other partitions int aggregatePartition = systemStream.getStream().hashCode() % partitionCount; LOG.debug(String.format("Send %s message from task %s to %s partition %s for aggregation", MessageType.of(message).name(), message.getTaskName(), systemStream, aggregatePartition)); OutgoingMessageEnvelope envelopeOut = new OutgoingMessageEnvelope(systemStream, aggregatePartition, null, message); collector.send(envelopeOut); }
void send(ControlMessage message, SystemStream systemStream, MessageCollector collector) { int partitionCount = getPartitionCount(systemStream); // We pick a partition based on topic hashcode to aggregate the control messages from upstream tasks // After aggregation the task will broadcast the results to other partitions int aggregatePartition = systemStream.getStream().hashCode() % partitionCount; LOG.debug(String.format("Send %s message from task %s to %s partition %s for aggregation", MessageType.of(message).name(), message.getTaskName(), systemStream, aggregatePartition)); OutgoingMessageEnvelope envelopeOut = new OutgoingMessageEnvelope(systemStream, aggregatePartition, null, message); collector.send(envelopeOut); }
void send(ControlMessage message, SystemStream systemStream, MessageCollector collector) { int partitionCount = getPartitionCount(systemStream); // We pick a partition based on topic hashcode to aggregate the control messages from upstream tasks // After aggregation the task will broadcast the results to other partitions int aggregatePartition = systemStream.getStream().hashCode() % partitionCount; LOG.debug(String.format("Send %s message from task %s to %s partition %s for aggregation", MessageType.of(message).name(), message.getTaskName(), systemStream, aggregatePartition)); OutgoingMessageEnvelope envelopeOut = new OutgoingMessageEnvelope(systemStream, aggregatePartition, null, message); collector.send(envelopeOut); }
void send(ControlMessage message, SystemStream systemStream, MessageCollector collector) { int partitionCount = getPartitionCount(systemStream); // We pick a partition based on topic hashcode to aggregate the control messages from upstream tasks // After aggregation the task will broadcast the results to other partitions int aggregatePartition = systemStream.getStream().hashCode() % partitionCount; LOG.debug(String.format("Send %s message from task %s to %s partition %s for aggregation", MessageType.of(message).name(), message.getTaskName(), systemStream, aggregatePartition)); OutgoingMessageEnvelope envelopeOut = new OutgoingMessageEnvelope(systemStream, aggregatePartition, null, message); collector.send(envelopeOut); }