Examples of ConfigScopeProperty


Examples of com.linkedin.helix.ConfigScope.ConfigScopeProperty

        return getConfigScopes();
      }

      scopeStr = scopeStr.toUpperCase();

      ConfigScopeProperty scopeProperty = ConfigScopeProperty.valueOf(scopeStr);
      switch (scopeProperty)
      {
      case CLUSTER:
      case PARTICIPANT:
      case RESOURCE:
View Full Code Here

Examples of com.linkedin.helix.ConfigScope.ConfigScopeProperty

    String clusterName = getValue("clusterName");

    String scopeStr = getValue("scope").toUpperCase();
    try
    {
      ConfigScopeProperty scopeProperty = ConfigScopeProperty.valueOf(scopeStr);

      switch (scopeProperty)
      {
      case CLUSTER:
        String scopeConfigStr =
            ConfigScopeProperty.CLUSTER.toString() + "=" + clusterName;
        setConfigs(entity, scopeConfigStr);
        break;
      case PARTICIPANT:
      case RESOURCE:
        String scopeKey1 = getValue("scopeKey1");

        if (scopeKey1 == null)
        {
          throw new HelixException("Missing resourceName|participantName");
        }
        else
        {
          scopeConfigStr =
              ConfigScopeProperty.CLUSTER.toString() + "=" + clusterName + ","
                  + scopeProperty.toString() + "=" + scopeKey1;

          setConfigs(entity, scopeConfigStr);
        }
        break;
      case PARTITION:
        scopeKey1 = getValue("scopeKey1");
        String scopeKey2 = getValue("scopeKey2");
        if (scopeKey1 == null || scopeKey2 == null)
        {
          throw new HelixException("Missing resourceName|partitionName");
        }
        else
        {
          scopeConfigStr =
              ConfigScopeProperty.CLUSTER.toString() + "=" + clusterName + ","
                  + ConfigScopeProperty.RESOURCE.toString() + "=" + scopeKey1 + ","
                  + scopeProperty.toString() + "=" + scopeKey2;
          setConfigs(entity, scopeConfigStr);
        }
        break;
      default:
        break;
View Full Code Here

Examples of com.linkedin.helix.ConfigScope.ConfigScopeProperty

          continue;
        }

        String scopeStr = scope.substring(0, idx);
        String value = scope.substring(idx + 1);
        ConfigScopeProperty scopeProperty = ConfigScopeProperty.valueOf(scopeStr);
        _scopeMap.put(scopeProperty, value);
      } catch (Exception e)
      {
        LOG.error("Invalid scope string: " + scope);
        continue;
View Full Code Here

Examples of org.apache.helix.ConfigScope.ConfigScopeProperty

          continue;
        }

        String scopeStr = scope.substring(0, idx);
        String value = scope.substring(idx + 1);
        ConfigScopeProperty scopeProperty = ConfigScopeProperty.valueOf(scopeStr);
        _scopeMap.put(scopeProperty, value);
      } catch (Exception e)
      {
        LOG.error("Invalid scope string: " + scope);
        continue;
View Full Code Here

Examples of org.apache.helix.ConfigScope.ConfigScopeProperty

        return getConfigScopes();
      }

      scopeStr = scopeStr.toUpperCase();

      ConfigScopeProperty scopeProperty = ConfigScopeProperty.valueOf(scopeStr);
      switch (scopeProperty)
      {
      case CLUSTER:
      case PARTICIPANT:
      case RESOURCE:
View Full Code Here

Examples of org.apache.helix.ConfigScope.ConfigScopeProperty

    String clusterName = getValue("clusterName");

    String scopeStr = getValue("scope").toUpperCase();
    try
    {
      ConfigScopeProperty scopeProperty = ConfigScopeProperty.valueOf(scopeStr);

      switch (scopeProperty)
      {
      case CLUSTER:
        String scopeConfigStr =
            ConfigScopeProperty.CLUSTER.toString() + "=" + clusterName;
        setConfigs(entity, scopeConfigStr);
        break;
      case PARTICIPANT:
      case RESOURCE:
        String scopeKey1 = getValue("scopeKey1");

        if (scopeKey1 == null)
        {
          throw new HelixException("Missing resourceName|participantName");
        }
        else
        {
          scopeConfigStr =
              ConfigScopeProperty.CLUSTER.toString() + "=" + clusterName + ","
                  + scopeProperty.toString() + "=" + scopeKey1;

          setConfigs(entity, scopeConfigStr);
        }
        break;
      case PARTITION:
        scopeKey1 = getValue("scopeKey1");
        String scopeKey2 = getValue("scopeKey2");
        if (scopeKey1 == null || scopeKey2 == null)
        {
          throw new HelixException("Missing resourceName|partitionName");
        }
        else
        {
          scopeConfigStr =
              ConfigScopeProperty.CLUSTER.toString() + "=" + clusterName + ","
                  + ConfigScopeProperty.RESOURCE.toString() + "=" + scopeKey1 + ","
                  + scopeProperty.toString() + "=" + scopeKey2;
          setConfigs(entity, scopeConfigStr);
        }
        break;
      default:
        break;
View Full Code Here

Examples of org.apache.helix.model.HelixConfigScope.ConfigScopeProperty

        return getConfigScopes();
      }

      scopeStr = scopeStr.toUpperCase();

      ConfigScopeProperty scopeProperty = ConfigScopeProperty.valueOf(scopeStr);
      switch (scopeProperty) {
      case CLUSTER:
      case PARTICIPANT:
      case RESOURCE:
        String scopeKey1 = getValue("scopeKey1");
View Full Code Here

Examples of org.apache.helix.model.HelixConfigScope.ConfigScopeProperty

  public Representation post(Representation entity) {
    String clusterName = getValue("clusterName");

    String scopeStr = getValue("scope").toUpperCase();
    try {
      ConfigScopeProperty scopeProperty = ConfigScopeProperty.valueOf(scopeStr);

      switch (scopeProperty) {
      case CLUSTER:
        String scopeArgs = clusterName;
        setConfigs(entity, scopeProperty, scopeArgs);
View Full Code Here

Examples of org.apache.helix.model.HelixConfigScope.ConfigScopeProperty

  public ConfigScope(ConfigScopeBuilder configScopeBuilder) {
    Map<ConfigScopeProperty, String> scopeMap = configScopeBuilder.getScopeMap();
    List<String> keys = new ArrayList<String>();

    ConfigScopeProperty curScope = null;
    for (ConfigScopeProperty scope : scopePriority) {
      if (scopeMap.containsKey(scope)) {
        if (curScope == null && scope == ConfigScopeProperty.CLUSTER) {
          keys.add(scopeMap.get(scope));
          curScope = ConfigScopeProperty.CLUSTER;
View Full Code Here

Examples of org.apache.helix.model.HelixConfigScope.ConfigScopeProperty

          continue;
        }

        String scopeStr = scope.substring(0, idx);
        String value = scope.substring(idx + 1);
        ConfigScopeProperty scopeProperty = ConfigScopeProperty.valueOf(scopeStr);
        _scopeMap.put(scopeProperty, value);
      } catch (Exception e) {
        LOG.error("Invalid scope string: " + scope);
        continue;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.