Package com.linkedin.helix

Examples of com.linkedin.helix.HelixException


          }
        }
      }
      else
      {
        throw new HelixException("Unsupported command: " + command
            + ". Should be one of [" + JsonParameters.ZK_DELETE_CHILDREN + "]");
      }

      getResponse().setStatus(Status.SUCCESS_OK);
    }
View Full Code Here


                                             String masterStateValue, String slaveStateValue)
  {
    Collections.sort(instanceNames);
    if(instanceNames.size() < replicas + 1)
    {
      throw new HelixException("Number of instances must not be less than replicas + 1. "
                                      + "instanceNr:" + instanceNames.size()
                                      + ", replicas:" + replicas);
    }
    else if(partitions < instanceNames.size())
    {
View Full Code Here

        scopeKey1 = getValue("scopeKey1");
        String scopeKey2 = getValue("scopeKey2");
        if (scopeKey1 == null)
        {
          // path is "/clusters/{clusterName}/configs/partition"
          throw new HelixException("Missing resourceName");
        }
        else if (scopeKey2 == null)
        {
          // path is "/clusters/{clusterName}/configs/partition/resourceName"
          representation = getConfigKeys(scopeProperty, scopeKey1);
View Full Code Here

      setupTool.removeConfig(scopeStr, propertiesStr);
    }
    else
    {
      throw new HelixException("Unsupported command: " + command + ". Should be one of ["
          + ClusterSetup.setConfig + ", " + ClusterSetup.removeConfig + "]");

    }

    getResponse().setEntity(represent());
View Full Code Here

      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 + ","
View Full Code Here

      _statusUpdateUtil.logError(message,
                                 HelixStateTransitionHandler.class,
                                 errorMessage,
                                 manager.getHelixDataAccessor());
      logger.error(errorMessage);
      throw new HelixException(errorMessage);
    }
    // DataAccessor accessor = manager.getDataAccessor();
    HelixDataAccessor accessor = manager.getHelixDataAccessor();

    String partitionName = message.getPartitionName();
View Full Code Here

    {
      String errorMsg =
          "Fail to create live instance node after waiting, so quit. instance:"
              + _instanceName;
      logger.warn(errorMsg);
      throw new HelixException(errorMsg);

    }
    String currentStatePathParent =
        PropertyPathConfig.getPath(PropertyType.CURRENTSTATES,
                                   _clusterName,
View Full Code Here

                                                EventType[] eventTypes,
                                                ChangeType changeType)
  {
    if (listener == null)
    {
      throw new HelixException("Listener cannot be null");
    }
    return new CallbackHandler(this, _zkClient, propertyKey, /* path, */ listener, eventTypes, changeType);
  }
View Full Code Here

    logger.info(zkConnection.getZookeeper());

    if (!ZKUtil.isClusterSetup(_clusterName, _zkClient))
    {
      throw new HelixException("Initial cluster structure is not set up for cluster:"
          + _clusterName);
    }
    if (!isInstanceSetup())
    {
      throw new HelixException("Initial cluster structure is not set up for instance:"
          + _instanceName + " instanceType:" + _instanceType);
    }

    if (_instanceType == InstanceType.PARTICIPANT
        || _instanceType == InstanceType.CONTROLLER_PARTICIPANT)
View Full Code Here

      {
        String errorMessage =
            "instance " + _instanceName + " already has a liveinstance in cluster "
                + _clusterName;
        logger.error(errorMessage);
        throw new HelixException(errorMessage);
      }
    }
    // Invoke the PreConnectCallbacks
    for (PreConnectCallback callback : _preConnectCallbacks)
    {
View Full Code Here

TOP

Related Classes of com.linkedin.helix.HelixException

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.