improve assertion message when components are missing
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6b8a0d9f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6b8a0d9f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6b8a0d9f Branch: refs/heads/cassandra-1.2.0 Commit: 6b8a0d9f15fa4147100f9218056fda8ba7ffabe9 Parents: 5b511b6 Author: Jonathan Ellis <jbel...@apache.org> Authored: Mon Dec 10 08:59:43 2012 -0600 Committer: Jonathan Ellis <jbel...@apache.org> Committed: Mon Dec 10 08:59:43 2012 -0600 ---------------------------------------------------------------------- .../apache/cassandra/io/sstable/SSTableReader.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6b8a0d9f/src/java/org/apache/cassandra/io/sstable/SSTableReader.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java index a631241..f3305b5 100644 --- a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java +++ b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java @@ -162,8 +162,8 @@ public class SSTableReader extends SSTable { assert partitioner != null; // Minimum components without which we can't do anything - assert components.contains(Component.DATA); - assert components.contains(Component.PRIMARY_INDEX); + assert components.contains(Component.DATA) : "Data component is missing for sstable" + descriptor; + assert components.contains(Component.PRIMARY_INDEX) : "Primary index component is missing for sstable " + descriptor; long start = System.currentTimeMillis(); logger.info("Opening {} ({} bytes)", descriptor, new File(descriptor.filenameFor(COMPONENT_DATA)).length());