Examples of stateTransitionStatus()


Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

    ZKHelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor<ZNRecord>(_gZkClient));
    Builder keyBuilder = accessor.keyBuilder();

    LiveInstance liveInstance = accessor.getProperty(keyBuilder.liveInstance(instance));
    accessor.removeProperty(keyBuilder.stateTransitionStatus(instance,
                                                             liveInstance.getSessionId(),
                                                             resource,
                                                             partition));

  }
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

    ZKHelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor<ZNRecord>(_gZkClient));
    Builder keyBuilder = accessor.keyBuilder();

    LiveInstance liveInstance = accessor.getProperty(keyBuilder.liveInstance(instance));
    accessor.removeProperty(keyBuilder.stateTransitionStatus(instance, liveInstance.getSessionId(),
        resource, partition));

  }

  // TODO: throw exception in reset()
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

      idealState.getRecord().setSimpleField(i + "", bufStr);
    }
    boolean succeed = accessor.setProperty(keyBuilder.idealStates("TestDB0"), idealState);
    Assert.assertFalse(succeed);
    HelixProperty property =
        accessor.getProperty(keyBuilder.stateTransitionStatus("localhost_12918", "session_1",
            "partition_1"));
    Assert.assertNull(property);

    // legal sized data gets written to zk
    idealState.getRecord().getSimpleFields().clear();
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

          if (sessionID != null && !session.equals(sessionID)) {
            continue;
          }

          List<String> resourceGroups =
              accessor.getChildNames(keyBuilder.stateTransitionStatus(instanceName, session));
          for (String resourceGroupName : resourceGroups) {
            if (!resourceGroupName.equals(resourceGroup)) {
              continue;
            }
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

            if (!resourceGroupName.equals(resourceGroup)) {
              continue;
            }

            List<String> partitionStrings =
                accessor.getChildNames(keyBuilder.stateTransitionStatus(instanceName, session,
                    resourceGroupName));

            for (String partitionString : partitionStrings) {
              ZNRecord partitionRecord =
                  accessor.getProperty(
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

                    resourceGroupName));

            for (String partitionString : partitionStrings) {
              ZNRecord partitionRecord =
                  accessor.getProperty(
                      keyBuilder.stateTransitionStatus(instanceName, session, resourceGroupName,
                          partitionString)).getRecord();
              if (!partitionString.equals(partition)) {
                continue;
              }
              partitionRecords.add(partitionRecord);
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

        ClusterRepresentationUtil.getInstanceSessionId(zkClient, clusterName, instanceName);

    Builder keyBuilder = new PropertyKey.Builder(clusterName);
    String message =
        ClusterRepresentationUtil.getInstancePropertiesAsString(zkClient, clusterName,
            keyBuilder.stateTransitionStatus(instanceName, instanceSessionId, resourceGroup),
            // instanceSessionId
            // + "__"
            // + resourceGroup,
            MediaType.APPLICATION_JSON);
    StringRepresentation representation =
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

            new StatusUpdate(createMessageLogRecord(message)));

      } else {

        PropertyKey propertyKey =
            keyBuilder.stateTransitionStatus(instanceName, sessionId, statusUpdateSubPath,
                statusUpdateKey);

        ZNRecord statusUpdateRecord = createMessageLogRecord(message);

        // For now write participant StatusUpdates to log4j.
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

          keyBuilder.controllerTaskStatus(statusUpdateSubPath, statusUpdateKey), new StatusUpdate(
              record));
    } else {

      PropertyKey propertyKey =
          keyBuilder.stateTransitionStatus(instanceName, sessionId, statusUpdateSubPath,
              statusUpdateKey);
      // For now write participant StatusUpdates to log4j.
      // we are using restlet as another data channel to report to controller.
      if (_logger.isTraceEnabled()) {
        _logger.trace("StatusUpdate path:" + propertyKey.getPath() + ", updates:" + record);
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.stateTransitionStatus()

    ZKHelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor<ZNRecord>(_gZkClient));
    Builder keyBuilder = accessor.keyBuilder();

    LiveInstance liveInstance = accessor.getProperty(keyBuilder.liveInstance(instance));
    accessor.removeProperty(keyBuilder.stateTransitionStatus(instance, liveInstance.getSessionId(),
        resource, partition));

  }

  // TODO: throw exception in reset()
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.