Package com.linkedin.helix.ConfigScope

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


    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

          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

Related Classes of com.linkedin.helix.ConfigScope.ConfigScopeProperty

Copyright © 2018 www.massapicom. 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.