helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject [20/50] [abbrv] git commit: Fix issue with updating provisioner config
Date Thu, 10 Jul 2014 17:05:03 GMT
Fix issue with updating provisioner config


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

Branch: refs/heads/master
Commit: 224c7eaaa0863ae89da7fe7ed12ce36303faca07
Parents: c072aca
Author: Kanak Biscuitwala <kanak@apache.org>
Authored: Mon Feb 24 10:13:22 2014 -0800
Committer: Kanak Biscuitwala <kanak@apache.org>
Committed: Mon Feb 24 10:13:22 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/helix/api/accessor/ResourceAccessor.java    | 5 +++++
 .../main/java/org/apache/helix/api/config/ResourceConfig.java   | 2 ++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/224c7eaa/helix-core/src/main/java/org/apache/helix/api/accessor/ResourceAccessor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/api/accessor/ResourceAccessor.java
b/helix-core/src/main/java/org/apache/helix/api/accessor/ResourceAccessor.java
index 8359da5..0052871 100644
--- a/helix-core/src/main/java/org/apache/helix/api/accessor/ResourceAccessor.java
+++ b/helix-core/src/main/java/org/apache/helix/api/accessor/ResourceAccessor.java
@@ -49,6 +49,7 @@ import org.apache.helix.model.ExternalView;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.model.IdealState.RebalanceMode;
 import org.apache.helix.model.InstanceConfig;
+import org.apache.helix.model.ProvisionerConfigHolder;
 import org.apache.helix.model.ResourceAssignment;
 import org.apache.helix.model.ResourceConfiguration;
 import org.apache.helix.model.StateModelDefinition;
@@ -260,6 +261,10 @@ public class ResourceAccessor {
       config.addNamespacedConfig(new RebalancerConfigHolder(resourceConfig.getRebalancerConfig())
           .toNamespacedConfig());
     }
+    if (resourceConfig.getProvisionerConfig() != null) {
+      config.addNamespacedConfig(new ProvisionerConfigHolder(resourceConfig.getProvisionerConfig())
+          .toNamespacedConfig());
+    }
     config.setBucketSize(resourceConfig.getBucketSize());
     config.setBatchMessageMode(resourceConfig.getBatchMessageMode());
     setConfiguration(resourceId, config, resourceConfig.getRebalancerConfig());

http://git-wip-us.apache.org/repos/asf/helix/blob/224c7eaa/helix-core/src/main/java/org/apache/helix/api/config/ResourceConfig.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/api/config/ResourceConfig.java b/helix-core/src/main/java/org/apache/helix/api/config/ResourceConfig.java
index 5443236..6185383 100644
--- a/helix-core/src/main/java/org/apache/helix/api/config/ResourceConfig.java
+++ b/helix-core/src/main/java/org/apache/helix/api/config/ResourceConfig.java
@@ -230,6 +230,7 @@ public class ResourceConfig {
       _updateFields.add(Fields.PROVISIONER_CONFIG);
       return this;
     }
+
     /**
      * Set the user configuration
      * @param userConfig user-specified properties
@@ -273,6 +274,7 @@ public class ResourceConfig {
       Builder builder =
           new Builder(orig.getId()).type(orig.getType())
               .rebalancerConfig(orig.getRebalancerConfig())
+              .provisionerConfig(orig.getProvisionerConfig())
               .schedulerTaskConfig(orig.getSchedulerTaskConfig()).userConfig(orig.getUserConfig())
               .bucketSize(orig.getBucketSize()).batchMessageMode(orig.getBatchMessageMode());
       for (Fields field : _updateFields) {


Mime
View raw message