Fix incorrect input verification check in ClusterMetadata
Change-Id: I921ae8a8ba8c35bd91f27d2d1d985096f023c211
Showing
1 changed file
with
3 additions
and
3 deletions
| ... | @@ -174,8 +174,8 @@ public final class ClusterMetadata { | ... | @@ -174,8 +174,8 @@ public final class ClusterMetadata { |
| 174 | */ | 174 | */ |
| 175 | private void verifyMetadata() { | 175 | private void verifyMetadata() { |
| 176 | verifyNotNull(metadata.getName(), "Cluster name must be specified"); | 176 | verifyNotNull(metadata.getName(), "Cluster name must be specified"); |
| 177 | - verify(CollectionUtils.isEmpty(metadata.getNodes()), "Cluster nodes must be specified"); | 177 | + verify(CollectionUtils.isNotEmpty(metadata.getNodes()), "Cluster nodes must be specified"); |
| 178 | - verify(CollectionUtils.isEmpty(metadata.getPartitions()), "Cluster partitions must be specified"); | 178 | + verify(CollectionUtils.isNotEmpty(metadata.getPartitions()), "Cluster partitions must be specified"); |
| 179 | 179 | ||
| 180 | // verify that partitions are constituted from valid cluster nodes. | 180 | // verify that partitions are constituted from valid cluster nodes. |
| 181 | boolean validPartitions = Collections2.transform(metadata.getNodes(), ControllerNode::id) | 181 | boolean validPartitions = Collections2.transform(metadata.getNodes(), ControllerNode::id) |
| ... | @@ -186,4 +186,4 @@ public final class ClusterMetadata { | ... | @@ -186,4 +186,4 @@ public final class ClusterMetadata { |
| 186 | verify(validPartitions, "Partition locations must be valid cluster nodes"); | 186 | verify(validPartitions, "Partition locations must be valid cluster nodes"); |
| 187 | } | 187 | } |
| 188 | } | 188 | } |
| 189 | -} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 189 | +} | ... | ... |
-
Please register or login to post a comment