public static void setClusterTenantIsolationEnabled(ZkHelixPropertyStore<ZNRecord> propertyStore, boolean isSingleTenantCluster) { final ZNRecord znRecord; final String path = constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY); if (!propertyStore.exists(path, AccessOption.PERSISTENT)) { znRecord = new ZNRecord(CLUSTER_TENANT_ISOLATION_ENABLED_KEY); } else { znRecord = propertyStore.get(path, null, AccessOption.PERSISTENT); } znRecord.setBooleanField(CLUSTER_TENANT_ISOLATION_ENABLED_KEY, isSingleTenantCluster); propertyStore.set(path, znRecord, AccessOption.PERSISTENT); }
updatedIdealState.getRecord().setBooleanField("enableCompression", true);
nextIdealState.getRecord().setBooleanField("enableCompression", true);
instanceConfig.getRecord().setBooleanField(CommonConstants.Helix.IS_SHUTDOWN_IN_PROGRESS, true); _helixAdmin.setInstanceConfig(_clusterName, instance, instanceConfig); instanceConfig.getRecord().setBooleanField(CommonConstants.Helix.IS_SHUTDOWN_IN_PROGRESS, false); _helixAdmin.setInstanceConfig(_clusterName, instance, instanceConfig); instanceConfig.getRecord().setBooleanField(CommonConstants.Helix.IS_SHUTDOWN_IN_PROGRESS, true); _helixAdmin.setInstanceConfig(_clusterName, instanceName, instanceConfig); instanceConfig.getRecord().setBooleanField(CommonConstants.Helix.IS_SHUTDOWN_IN_PROGRESS, false); _helixAdmin.setInstanceConfig(_clusterName, instanceName, instanceConfig);
/** * Enable/Disable the delayed rebalance. * By default it is enabled if not set. * * @param enabled */ public void setDelayRebalanceEnabled(boolean enabled) { _record.setBooleanField(ResourceConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled); }
/** * Disable/enable delay rebalance. * By default, this is ENABLED if not set. * * @param enabled */ public void setDelayRebalaceEnabled(boolean enabled) { _record.setBooleanField(ClusterConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled); }
/** * Enable/Disable the delayed rebalance. By default it is enabled if not set. * * @param enabled */ public void setDelayRebalanceEnabled(boolean enabled) { _record.setBooleanField(ResourceConfig.ResourceConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled); }
/** * Enable/disable topology aware rebalacning. If enabled, both {@link #setTopology(String)} and * {@link #setFaultZoneType(String)} should be set. * By default, this is DISABLED if not set. * * @param enabled */ public void setTopologyAwareEnabled(boolean enabled) { _record.setBooleanField(ClusterConfigProperty.TOPOLOGY_AWARE_ENABLED.name(), enabled); }
/** * Enable/disable target externalview persist * @param enabled */ public void enableTargetExternalView(boolean enabled) { _record.setBooleanField(ClusterConfigProperty.TARGET_EXTERNALVIEW_ENABLED.name(), enabled); }
/** * Enable/disable topology aware rebalacning. If enabled, both {@link #setTopology(String)} and * {@link #setFaultZoneType(String)} should be set. * By default, this is DISABLED if not set. * * @param enabled */ public void setTopologyAwareEnabled(boolean enabled) { _record.setBooleanField(ClusterConfigProperty.TOPOLOGY_AWARE_ENABLED.name(), enabled); }
/** * Disable/enable delay rebalance. * By default, this is ENABLED if not set. * * @param enabled */ public void setDelayRebalaceEnabled(boolean enabled) { _record.setBooleanField(ClusterConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled); }
/** * Enable/Disable the delayed rebalance. * By default it is enabled if not set. * * @param enabled */ public void setDelayRebalanceEnabled(boolean enabled) { _record.setBooleanField(ResourceConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled); }
/** * Enable/disable target externalview persist * @param enabled */ public void enableTargetExternalView(boolean enabled) { _record.setBooleanField(ClusterConfigProperty.TARGET_EXTERNALVIEW_ENABLED.name(), enabled); }
/** * Enable P2P state transition message for all resources in this cluster. P2P State Transition * message can reduce the top-state replica unavailable time during top-state handoff period. This * only applies for those resources with state models that only have a single top-state replica, * such as MasterSlave or LeaderStandy models. By default P2P message is disabled if not set. * * @param enabled */ public void enableP2PMessage(boolean enabled) { _record.setBooleanField(HelixConfigProperty.P2P_MESSAGE_ENABLED.name(), enabled); }
/** * Enable P2P state transition message for all resources in this cluster. P2P State Transition * message can reduce the top-state replica unavailable time during top-state handoff period. This * only applies for those resources with state models that only have a single top-state replica, * such as MasterSlave or LeaderStandy models. By default P2P message is disabled if not set. * * @param enabled */ public void enableP2PMessage(boolean enabled) { _record.setBooleanField(HelixConfigProperty.P2P_MESSAGE_ENABLED.name(), enabled); }
/** * Enable/Disable the delayed rebalance. By default it is enabled if not set. * * @param enabled */ public void setDelayRebalanceEnabled(boolean enabled) { _record.setBooleanField(ResourceConfig.ResourceConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled); }
/** * Set the enabled state of the instance * * @param enabled true to enable, false to disable */ public void setInstanceEnabled(boolean enabled) { _record.setBooleanField(InstanceConfigProperty.HELIX_ENABLED.toString(), enabled); _record.setLongField(InstanceConfigProperty.HELIX_ENABLED_TIMESTAMP.name(), System.currentTimeMillis()); }
/** * Set the enabled state of the instance * * @param enabled true to enable, false to disable */ public void setInstanceEnabled(boolean enabled) { _record.setBooleanField(InstanceConfigProperty.HELIX_ENABLED.toString(), enabled); _record.setLongField(InstanceConfigProperty.HELIX_ENABLED_TIMESTAMP.name(), System.currentTimeMillis()); }
/** * Enable/Disable state transition cancellation for the cluster * @param enable */ public void stateTransitionCancelEnabled(Boolean enable) { if (enable == null) { _record.getSimpleFields() .remove(ClusterConfigProperty.STATE_TRANSITION_CANCELLATION_ENABLED.name()); } else { _record.setBooleanField(ClusterConfigProperty.STATE_TRANSITION_CANCELLATION_ENABLED.name(), enable); } }
/** * Enable/Disable persist best possible assignment in a resource's idealstate. * CAUTION: if both {@link #setPersistBestPossibleAssignment(Boolean)} and {@link #setPersistIntermediateAssignment(Boolean)} * are set to true, the IntermediateAssignment will be persisted into IdealState's map field. * By default, it is DISABLED if not set. * @return */ public void setPersistBestPossibleAssignment(Boolean enable) { if (enable == null) { _record.getSimpleFields().remove(ClusterConfigProperty.PERSIST_BEST_POSSIBLE_ASSIGNMENT.toString()); } else { _record.setBooleanField(ClusterConfigProperty.PERSIST_BEST_POSSIBLE_ASSIGNMENT.toString(), enable); } }