cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eduard Tudenhoefner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-4763) SSTableLoader shouldn't get keyspace from path
Date Fri, 18 Aug 2017 14:23:00 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-4763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133019#comment-16133019
] 

Eduard Tudenhoefner commented on CASSANDRA-4763:
------------------------------------------------

It seems that even with the old format where the sstable would contain keyspace/table names,
*sstableloader* would still try to get the name from the path
{code}
$ ll /var/lib/cassandra/data/keyspace1/standard1-4752be9083af11e7a8f5270d6df438fd/snapshots/1503017601804
total 80
drwxr-xr-x  11 root  wheel   374B Aug 17 17:53 .
drwxr-xr-x   3 root  wheel   102B Aug 17 17:53 ..
-rw-r--r--   2 root  wheel     8B Aug 17 17:53 keyspace1-standard1-ka-1-CRC.db
-rw-r--r--   2 root  wheel   2.7K Aug 17 17:53 keyspace1-standard1-ka-1-Data.db
-rw-r--r--   2 root  wheel    10B Aug 17 17:53 keyspace1-standard1-ka-1-Digest.sha1
-rw-r--r--   2 root  wheel    24B Aug 17 17:53 keyspace1-standard1-ka-1-Filter.db
-rw-r--r--   2 root  wheel   240B Aug 17 17:53 keyspace1-standard1-ka-1-Index.db
-rw-r--r--   2 root  wheel   4.4K Aug 17 17:53 keyspace1-standard1-ka-1-Statistics.db
-rw-r--r--   2 root  wheel   130B Aug 17 17:53 keyspace1-standard1-ka-1-Summary.db
-rw-r--r--   2 root  wheel    79B Aug 17 17:53 keyspace1-standard1-ka-1-TOC.txt
-rw-r--r--   1 root  wheel    47B Aug 17 17:53 manifest.json
{code}
{code}
$ sstableloader -d localhost /var/lib/cassandra/data/keyspace1/standard1-4752be9083af11e7a8f5270d6df438fd/snapshots/1503017601804/
Could not retrieve endpoint ranges:
InvalidRequestException(why:No such keyspace: snapshots)
java.lang.RuntimeException: Could not retrieve endpoint ranges:
	at org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:342)
	at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:156)
	at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:109)
Caused by: InvalidRequestException(why:No such keyspace: snapshots)
	at org.apache.cassandra.thrift.Cassandra$describe_ring_result$describe_ring_resultStandardScheme.read(Cassandra.java:35320)
	at org.apache.cassandra.thrift.Cassandra$describe_ring_result$describe_ring_resultStandardScheme.read(Cassandra.java:35287)
	at org.apache.cassandra.thrift.Cassandra$describe_ring_result.read(Cassandra.java:35229)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:86)
	at org.apache.cassandra.thrift.Cassandra$Client.recv_describe_ring(Cassandra.java:1292)
	at org.apache.cassandra.thrift.Cassandra$Client.describe_ring(Cassandra.java:1279)
	at org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:307)
	... 2 more
{code}



> SSTableLoader shouldn't get keyspace from path
> ----------------------------------------------
>
>                 Key: CASSANDRA-4763
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4763
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Nick Bailey
>            Assignee: Eduard Tudenhoefner
>            Priority: Minor
>             Fix For: 2.1.x
>
>
> SSTableLoader currently gets the keyspace it is going to load to from the path of the
directoy of sstables it is loading. This isn't really documented (or I didn't see it), but
also isn't really a good way of doing it in general.
> {noformat}
> this.keyspace = directory.getParentFile().getName();
> {noformat}
> We should probably just let users pass the name in. If you are loading a snapshot the
file names will have the keyspace which is slightly better but people manually creating their
own sstables might not format them the same.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message