Package org.apache.helix.api.accessor

Examples of org.apache.helix.api.accessor.ParticipantAccessor.updateParticipant()


      HelixConnection connection) {
    // add a tag to the participant and change the hostname, then update it using a delta
    ParticipantAccessor accessor = connection.createParticipantAccessor(clusterId);
    ParticipantConfig.Delta delta =
        new ParticipantConfig.Delta(participant.getId()).addTag("newTag").setHostName("newHost");
    accessor.updateParticipant(participant.getId(), delta);
  }

  private static void updateResource(ResourceConfig resource, ClusterId clusterId,
      HelixConnection connection) {
    // add some fields to the resource user config, then update it using the resource config delta
View Full Code Here


    ParticipantAccessor accessor = participantAccessor(clusterName);
    ParticipantId participantId = ParticipantId.from(participantName);

    ParticipantConfig.Delta delta = new ParticipantConfig.Delta(participantId);
    delta.addTag(tag);
    accessor.updateParticipant(participantId, delta);
  }

  void removeInstanceTag(String[] optValues) {
    String clusterName = optValues[0];
    String participantName = optValues[1];
View Full Code Here

    ParticipantAccessor accessor = participantAccessor(clusterName);
    ParticipantId participantId = ParticipantId.from(participantName);

    ParticipantConfig.Delta delta = new ParticipantConfig.Delta(participantId);
    delta.removeTag(tag);
    accessor.updateParticipant(participantId, delta);
  }

  void listPartitionInfo(String[] optValues) {
    String clusterName = optValues[0];
    String resourceName = optValues[1];
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.