You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2018/01/25 21:49:40 UTC

[49/50] [abbrv] helix git commit: Add instance support for CriteriaEvalutator

Add instance support for CriteriaEvalutator


Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/4e7eca51
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/4e7eca51
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/4e7eca51

Branch: refs/heads/master
Commit: 4e7eca5171f509bc3669ad018beef1e149eca6a5
Parents: 77b09c3
Author: Junkai Xue <jx...@linkedin.com>
Authored: Thu Jan 11 10:38:16 2018 -0800
Committer: Junkai Xue <jx...@linkedin.com>
Committed: Wed Jan 24 18:33:34 2018 -0800

----------------------------------------------------------------------
 helix-core/src/main/java/org/apache/helix/PropertyKey.java   | 8 ++++++++
 .../java/org/apache/helix/messaging/CriteriaEvaluator.java   | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/4e7eca51/helix-core/src/main/java/org/apache/helix/PropertyKey.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/PropertyKey.java b/helix-core/src/main/java/org/apache/helix/PropertyKey.java
index 4e58a89..4129671 100644
--- a/helix-core/src/main/java/org/apache/helix/PropertyKey.java
+++ b/helix-core/src/main/java/org/apache/helix/PropertyKey.java
@@ -322,6 +322,14 @@ public class PropertyKey {
     }
 
     /**
+     * Get a property key associated with specified instance
+     * @return {@link PropertyKey}
+     */
+    public PropertyKey instance(String instanceName) {
+      return new PropertyKey(PropertyType.INSTANCES, null, _clusterName, instanceName);
+    }
+
+    /**
      * Get a property key associated with {@link Message} for an instance
      * @param instanceName
      * @return {@link PropertyKey}

http://git-wip-us.apache.org/repos/asf/helix/blob/4e7eca51/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java b/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java
index cd6aed6..ec7b0fd 100644
--- a/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java
+++ b/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java
@@ -41,7 +41,7 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 
 public class CriteriaEvaluator {
-  private static Logger logger = Logger.getLogger(CriteriaEvaluator.class);
+  private static Logger logger = LoggerFactory.getLogger(CriteriaEvaluator.class);
   public static final String MATCH_ALL_SYM = "%";
 
   /**