Package com.linkedin.helix

Examples of com.linkedin.helix.HelixDataAccessor.updateProperty()


                              sessionId,
                              resource,
                              bucketizer.getBucketName(partitionKey));
      if (!_message.getGroupMessageMode())
      {
        accessor.updateProperty(key, _currentStateDelta);
      }
      else
      {
        _executor._groupMsgHandler.addCurStateUpdate(_message, key, _currentStateDelta);
      }
View Full Code Here


    if (code == ErrorCode.ERROR)
    {
      currentStateDelta.setState(partition, "ERROR");
      _stateModel.updateState("ERROR");

      accessor.updateProperty(keyBuilder.currentState(instanceName,
                                                      _message.getTgtSessionId(),
                                                      resourceName),
                              currentStateDelta);
    }
  }
View Full Code Here

            // Mark the message as UNPROCESSABLE if we hit a exception while creating
            // handler for it. The message will stay on ZK and not be processed.
            message.setMsgState(MessageState.UNPROCESSABLE);
            if (message.getTgtName().equalsIgnoreCase("controller"))
            {
              accessor.updateProperty(keyBuilder.controllerMessage(message.getId()),
                                      message);
            }
            else
            {
              accessor.updateProperty(keyBuilder.message(instanceName, message.getId()),
View Full Code Here

              accessor.updateProperty(keyBuilder.controllerMessage(message.getId()),
                                      message);
            }
            else
            {
              accessor.updateProperty(keyBuilder.message(instanceName, message.getId()),
                                      message);
            }
            continue;
          }
         
View Full Code Here

          // TODO: changed to async update
          // group update current state
          Map<PropertyKey, CurrentState> curStateMap = info.merge();
          for (PropertyKey key : curStateMap.keySet())
          {
            accessor.updateProperty(key, curStateMap.get(key));
          }

          // remove group message
          removeMessageFromZk(accessor, _message);
          reportMessageStat(_manager, _message, taskResult);
View Full Code Here

      }
    }
    try
    {
      // Update the ZK current state of the node.
      accessor.updateProperty(keyBuilder.currentState(instanceName,
                                                      sessionId,
                                                      resource,
                                                      bucketizer.getBucketName(partitionKey)),
                              _currentStateDelta);
    }
View Full Code Here

    if (code == ErrorCode.ERROR)
    {
      currentStateDelta.setState(partition, "ERROR");
      _stateModel.updateState("ERROR");

      accessor.updateProperty(keyBuilder.currentState(instanceName,
                                                      _message.getTgtSessionId(),
                                                      resourceName),
                              currentStateDelta);
    }
  }
View Full Code Here

    LiveInstance instance = helixDataAccessor.getProperty(propertyKey);

    Map<String, String> map = new TreeMap<String, String>();
    map.put("k1", "v1");
    instance.getRecord().setMapField("test", map);
    Assert.assertTrue(helixDataAccessor.updateProperty(propertyKey, instance),
                      "Failed to update live instance node");

    instances = changeList.poll(1, TimeUnit.SECONDS);
    Assert.assertNotNull(instances, "Expecting a list of live instance");
    Assert.assertEquals(instances.get(0).getRecord().getMapField("test"),
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.