Madan Jampani

Fix incorrect input verification check in ClusterMetadata

Change-Id: I921ae8a8ba8c35bd91f27d2d1d985096f023c211
......@@ -174,8 +174,8 @@ public final class ClusterMetadata {
*/
private void verifyMetadata() {
verifyNotNull(metadata.getName(), "Cluster name must be specified");
verify(CollectionUtils.isEmpty(metadata.getNodes()), "Cluster nodes must be specified");
verify(CollectionUtils.isEmpty(metadata.getPartitions()), "Cluster partitions must be specified");
verify(CollectionUtils.isNotEmpty(metadata.getNodes()), "Cluster nodes must be specified");
verify(CollectionUtils.isNotEmpty(metadata.getPartitions()), "Cluster partitions must be specified");
// verify that partitions are constituted from valid cluster nodes.
boolean validPartitions = Collections2.transform(metadata.getNodes(), ControllerNode::id)
......@@ -186,4 +186,4 @@ public final class ClusterMetadata {
verify(validPartitions, "Partition locations must be valid cluster nodes");
}
}
}
\ No newline at end of file
}
......