@Override
public void process(ClusterEvent event) throws Exception {
HelixManager manager = event.getAttribute("helixmanager");
ClusterDataCache cache = event.getAttribute("ClusterDataCache");
if (manager == null || cache == null) {
throw new StageException("Missing attributes in event:" + event
+ ". Requires HelixManager | DataCache");
}
HelixManagerProperties properties = manager.getProperties();
Map<String, LiveInstance> liveInstanceMap = cache.getLiveInstances();
for (LiveInstance liveInstance : liveInstanceMap.values()) {
String participantVersion = liveInstance.getHelixVersion();
if (!properties.isParticipantCompatible(participantVersion)) {
String errorMsg =
"incompatible participant. pipeline will not continue. " + "controller: "
+ manager.getInstanceName() + ", controllerVersion: " + properties.getVersion()
+ ", minimumSupportedParticipantVersion: "
+ properties.getProperty("miminum_supported_version.participant")
+ ", participant: " + liveInstance.getInstanceName() + ", participantVersion: "
+ participantVersion;
LOG.error(errorMsg);
throw new StageException(errorMsg);
}
}
}