private static void WriteTopicPartitionAssignment( ZkClient zkClient, string topic, Dictionary <int, List <int> > replicaAssignment, bool update) { var zkPath = ZkUtils.GetTopicPath(topic); var jsonPartitonData = ZkUtils.ReplicaAssignmentZkData(replicaAssignment.ToDictionary(x => x.Key.ToString(), v => v.Value)); if (!update) { Logger.InfoFormat("Topic creation: {0}", jsonPartitonData); ZkUtils.CreatePersistentPath(zkClient, zkPath, jsonPartitonData); } else { Logger.InfoFormat("Topic update {0}" + jsonPartitonData); ZkUtils.UpdatePersistentPath(zkClient, zkPath, jsonPartitonData); } Logger.DebugFormat("Updated path {0} with {1} for replica assignment", zkPath, jsonPartitonData); }