[
https://issues.apache.org/jira/browse/CASSANDRA-6529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13860335#comment-13860335
]
Tyler Hobbs commented on CASSANDRA-6529:
----------------------------------------
It would be nice to have an error message instead of a stack trace:
{noformat}
~/cassandra $ bin/sstableloader /foo/bar -d 127.0.0.1
Exception in thread "main" java.lang.RuntimeException: Could not retrieve
endpoint ranges:
at
org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:239)
at
org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:149)
at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:79)
Caused by: InvalidRequestException(why:No such keyspace: foo)
at
org.apache.cassandra.thrift.Cassandra$describe_ring_result$describe_ring_resultStandardScheme.read(Cassandra.java:34055)
at
org.apache.cassandra.thrift.Cassandra$describe_ring_result$describe_ring_resultStandardScheme.read(Cassandra.java:34022)
at
org.apache.cassandra.thrift.Cassandra$describe_ring_result.read(Cassandra.java:33964)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
at
org.apache.cassandra.thrift.Cassandra$Client.recv_describe_ring(Cassandra.java:1251)
at
org.apache.cassandra.thrift.Cassandra$Client.describe_ring(Cassandra.java:1238)
at
org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:215)
{noformat}
Can we wrap the describe_ring() call in a try/catch for InvalidRequestException
and just print the "why" attribute and a brief message that suggests checking
the usage?
> sstableloader shows no progress or errors when pointed at a bad directory
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-6529
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6529
> Project: Cassandra
> Issue Type: Bug
> Components: Tools
> Reporter: Tyler Hobbs
> Assignee: Marcus Eriksson
> Priority: Minor
> Fix For: 2.0.5
>
> Attachments:
> 0001-verify-that-the-keyspace-exists-in-describeRing.patch
>
>
> With sstableloader, the source directory is supposed to be in the format
> {{<keyspace_name>/<table_name>/}}. If you incorrectly just put the sstables
> in a {{<keyspace_name>/}} directory, the sstableloader process will not show
> any progress, errors, or other output, it will simply hang.
> This was initially reported on the user ML here:
> http://www.mail-archive.com/[email protected]/msg33916.html
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)