@Override public void onPolicyCreated(Map<String, T> added) { if(LOG.isDebugEnabled()) LOG.debug(executorId + ", partition " + partitionSeq + " policy added : " + added + " policyEvaluators " + policyEvaluators); for(T alertDef : added.values()){ if(!accept(alertDef)) continue; LOG.info(executorId + ", partition " + partitionSeq + " policy really added " + alertDef); PolicyEvaluator<T> newEvaluator = createPolicyEvaluator(alertDef); if(newEvaluator != null){ synchronized(this.policyEvaluators) { policyEvaluators.put(alertDef.getTags().get(Constants.POLICY_ID), newEvaluator); } } } }
int part = partitioner.partition(numPartitions, alertDef.getTags().get(Constants.POLICY_TYPE), alertDef.getTags().get(Constants.POLICY_ID)); if (part == partitionSeq) { tmpPolicyEvaluators.put(alertDef.getTags().get(Constants.POLICY_ID), createPolicyEvaluator(alertDef));