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);
UserConfig userConfig = resource.getUserConfig();
Map<String, String> mapField = Maps.newHashMap();
mapField.put("k1", "v1");
mapField.put("k2", "v2");
userConfig.setMapField("sampleMap", mapField);
ResourceConfig.Delta delta = new ResourceConfig.Delta(resource.getId()).addUserConfig(userConfig);
accessor.updateResource(resource.getId(), delta);
}