public static boolean getClusterTenantIsolationEnabled(ZkHelixPropertyStore<ZNRecord> propertyStore) { String controllerConfigPath = constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY); if (propertyStore.exists(controllerConfigPath, AccessOption.PERSISTENT)) { ZNRecord znRecord = propertyStore.get(controllerConfigPath, null, AccessOption.PERSISTENT); if (znRecord.getSimpleFields().keySet().contains(CLUSTER_TENANT_ISOLATION_ENABLED_KEY)) { return znRecord.getBooleanField(CLUSTER_TENANT_ISOLATION_ENABLED_KEY, true); } else { return true; } } else { return true; } } }
} catch (Exception e) { boolean idealStateIsCompressed = updatedIdealState.getRecord().getBooleanField("enableCompression", false); LOGGER.warn("Caught exception while updating ideal state for resource: {} (compressed={})", resourceName, idealStateIsCompressed, e);
/** * Whether this cluster is a ViewCluster * @return */ public boolean isViewCluster() { return _record .getBooleanField(ClusterConfigProperty.VIEW_CLUSTER.name(), false); }
/** * Whether to persist IntermediateAssignment in a resource's idealstate. * * @return */ public Boolean isPersistIntermediateAssignment() { return _record .getBooleanField(ClusterConfigProperty.PERSIST_INTERMEDIATE_ASSIGNMENT.toString(), false); }
/** * Check if this instance is enabled and able to serve replicas * @return true if enabled, false if disabled */ public boolean getInstanceEnabled() { return _record.getBooleanField(InstanceConfigProperty.HELIX_ENABLED.toString(), true); }
/** * Whether the P2P state transition message is enabled for all resources in this cluster. By * default it is disabled if not set. * * @return */ public boolean isP2PMessageEnabled() { return _record.getBooleanField(HelixConfigProperty.P2P_MESSAGE_ENABLED.name(), false); }
/** * Whether to persist best possible assignment in a resource's idealstate. * * @return */ public Boolean isPersistBestPossibleAssignment() { return _record .getBooleanField(ClusterConfigProperty.PERSIST_BEST_POSSIBLE_ASSIGNMENT.toString(), false); }
/** * Whether the P2P state transition message is enabled for all resources in this cluster. By * default it is disabled if not set. * * @return */ public boolean isP2PMessageEnabled() { return _record.getBooleanField(HelixConfigProperty.P2P_MESSAGE_ENABLED.name(), false); }
/** * If the external view for this resource is disabled. by default, it is false. * * @return true if the external view should be disabled for this resource. */ public boolean isExternalViewDisabled() { return _record.getBooleanField(IdealStateProperty.EXTERNAL_VIEW_DISABLED.name(), false); }
/** * Get if the resource is enabled or not * By default, it's enabled * @return true if enabled; false otherwise */ public boolean isEnabled() { return _record.getBooleanField(IdealStateProperty.HELIX_ENABLED.name(), true); }
/** * Get the value of DisableMonitoring set. * * @return the MonitoringDisabled is true or false */ public Boolean isMonitoringDisabled() { return _record.getBooleanField(ResourceConfigProperty.MONITORING_DISABLED.toString(), false); }
/** * Whether the P2P state transition message is enabled for this resource. * By default it is disabled if not set. * * @return */ public boolean isP2PMessageEnabled() { return _record.getBooleanField(HelixConfigProperty.P2P_MESSAGE_ENABLED.name(), false); }
/** * Get if the resource group routing feature is enabled or not * By default, it's disabled * * @return true if enabled; false otherwise */ public Boolean isGroupRoutingEnabled() { return _record.getBooleanField(ResourceConfigProperty.GROUP_ROUTING_ENABLED.name(), false); }
/** * Get if the resource group routing feature is enabled or not * By default, it's disabled * * @return true if enabled; false otherwise */ public boolean isResourceGroupEnabled() { return _record.getBooleanField(IdealStateProperty.GROUP_ROUTING_ENABLED.name(), false); }
/** * Get if the resource is enabled or not * By default, it's enabled * @return true if enabled; false otherwise */ public boolean isEnabled() { return _record.getBooleanField(IdealStateProperty.HELIX_ENABLED.name(), true); }
/** * Check whether the group routing is enabled for this resource. * * @return true if the group routing enabled for this resource; false otherwise */ public boolean isGroupRoutingEnabled() { return _record.getBooleanField(ExternalViewProperty.GROUP_ROUTING_ENABLED.name(), false); }
/** * Get if the resource is enabled or not * By default, it's enabled * @return true if enabled; false otherwise */ public Boolean isEnabled() { return _record.getBooleanField(ResourceConfigProperty.HELIX_ENABLED.name(), true); }
/** * Check if this instance is enabled and able to serve replicas * @return true if enabled, false if disabled */ public boolean getInstanceEnabled() { return _record.getBooleanField(InstanceConfigProperty.HELIX_ENABLED.toString(), true); }
/** * Get if the resource group routing feature is enabled or not * By default, it's disabled * * @return true if enabled; false otherwise */ public Boolean isGroupRoutingEnabled() { return _record.getBooleanField(ResourceConfigProperty.GROUP_ROUTING_ENABLED.name(), false); }
/** * If the external view for this resource is disabled. by default, it is false. * * @return true if the external view should be disabled for this resource. */ public boolean isExternalViewDisabled() { return _record.getBooleanField(IdealStateProperty.EXTERNAL_VIEW_DISABLED.name(), false); }