}
// And use first node to send messages to them
for (String partitionName : secondPartitions) {
for (int i = 0; i < numMessages; i++) {
HelixMessageScope scope =
new HelixMessageScope.Builder().cluster(firstNode.getClusterName())
.resource(RESOURCE_NAME).partition(partitionName).state("ONLINE").build();
Set<HelixAddress> destinations = firstResolver.getDestinations(scope);
for (HelixAddress destination : destinations) {
ByteBuf message = Unpooled.wrappedBuffer(("Hello" + i).getBytes());
firstIPC.send(destination, messageType, UUID.randomUUID(), message);
}
}
}
// Loopback
for (String partitionName : secondPartitions) {
for (int i = 0; i < numMessages; i++) {
HelixMessageScope scope =
new HelixMessageScope.Builder().cluster(secondNode.getClusterName())
.resource(RESOURCE_NAME).partition(partitionName).state("ONLINE").build();
Set<HelixAddress> destinations = secondResolver.getDestinations(scope);
for (HelixAddress destination : destinations) {