helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject helix git commit: Fix ResourceConfig validation
Date Thu, 09 Feb 2017 22:07:46 GMT
Repository: helix
Updated Branches:
  refs/heads/helix-0.6.x 4bac1232e -> 42273bb2b


Fix ResourceConfig validation

Fix validation of resource config for RebalanceConfig check


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

Branch: refs/heads/helix-0.6.x
Commit: 42273bb2b63fb2e2499601fd78b29c663e7fe097
Parents: 4bac123
Author: Junkai Xue <jxue@linkedin.com>
Authored: Thu Feb 9 14:01:16 2017 -0800
Committer: Junkai Xue <jxue@linkedin.com>
Committed: Thu Feb 9 14:01:16 2017 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/helix/model/ResourceConfig.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/42273bb2/helix-core/src/main/java/org/apache/helix/model/ResourceConfig.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/model/ResourceConfig.java b/helix-core/src/main/java/org/apache/helix/model/ResourceConfig.java
index 616d8a2..b195623 100644
--- a/helix-core/src/main/java/org/apache/helix/model/ResourceConfig.java
+++ b/helix-core/src/main/java/org/apache/helix/model/ResourceConfig.java
@@ -545,7 +545,7 @@ public class ResourceConfig extends HelixProperty {
       if (_rebalanceConfig == null) {
         throw new IllegalArgumentException("RebalanceConfig not set!");
       } else {
-        if (_rebalanceConfig.isValid()) {
+        if (!_rebalanceConfig.isValid()) {
           throw new IllegalArgumentException("Invalid RebalanceConfig!");
         }
       }
@@ -571,7 +571,8 @@ public class ResourceConfig extends HelixProperty {
     }
 
     public ResourceConfig build() {
-      validate();
+      // TODO: Reenable the validation in the future when ResourceConfig is ready.
+      // validate();
 
       return new ResourceConfig(_resourceId, _monitorDisabled, _numPartitions, _stateModelDefRef,
           _stateModelFactoryName, _numReplica, _minActiveReplica, _maxPartitionsPerInstance,


Mime
View raw message