Examples of stateTransitionStatus()


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

    Builder kb = accessor.keyBuilder();

    for (int i = 0; i < NODE_NR; i++) {
      String instanceName = _participants[i].getInstanceName();
      List<StatusUpdate> statusUpdates =
          accessor.getChildValues(kb.stateTransitionStatus(instanceName,
              _participants[i].getSessionId(), TEST_DB));

        for (int j = 0; j < 10; j++) {
          statusUpdates =
              accessor.getChildValues(kb.stateTransitionStatus(instanceName,
View Full Code Here

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

          accessor.getChildValues(kb.stateTransitionStatus(instanceName,
              _participants[i].getSessionId(), TEST_DB));

        for (int j = 0; j < 10; j++) {
          statusUpdates =
              accessor.getChildValues(kb.stateTransitionStatus(instanceName,
                _participants[i].getSessionId(), TEST_DB));
          if (statusUpdates.size() == 0) {
            Thread.sleep(500);
          } else {
            break;
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()

            new StatusUpdate(createMessageLogRecord(message)));

      } else {

        PropertyKey propertyKey =
            keyBuilder.stateTransitionStatus(instanceName, sessionId.stringify(),
                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.stringify(),
              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()

      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()

    ZKHelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, _baseAccessor);
    Builder keyBuilder = accessor.keyBuilder();

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

  }

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