[ https://issues.apache.org/jira/browse/CASSANDRA-4763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133937#comment-16133937 ]
Eduard Tudenhoefner commented on CASSANDRA-4763: ------------------------------------------------ Here's a first draft Branch: https://github.com/nastra/cassandra/tree/CASSANDRA-4763-40 Test: https://circleci.com/gh/nastra/cassandra/14 New parameters: {code} -k,--keyspace <KEYSPACE> Name of the keyspace -tb,--table <TABLE> Name of the table {code} Example: {code} $ bin/sstableloader -d localhost /Users/nastra/Development/sstable_data/ -k keyspace1 -tb standard1 Established connection to initial hosts Opening sstables and calculating sections to stream Streaming relevant part of /Users/nastra/Development/sstable_data/na-1-big-Data.db to [localhost/127.0.0.1] progress: [localhost/127.0.0.1]0:1/1 100% total: 100% 0.740KiB/s (avg: 0.740KiB/s) progress: [localhost/127.0.0.1]0:1/1 100% total: 100% 0.000KiB/s (avg: 0.736KiB/s) Summary statistics: Connections per host : 1 Total files transferred : 1 Total bytes transferred : 2.197KiB Total duration : 2981 ms Average transfer rate : 0.736KiB/s Peak transfer rate : 0.740KiB/s {code} If either keyspace or table isn't provided, then we're using the old way aka extracting the info from the directory path. > 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: 4.0 > > > 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-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org