private static void updateParticipant(ParticipantConfig participant, ClusterId clusterId, HelixConnection connection) {
// add a tag to the participant and change the hostname, then update it using a delta
ClusterAccessor accessor = connection.createClusterAccessor(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
ClusterAccessor accessor = connection.createClusterAccessor(clusterId);