-
Notifications
You must be signed in to change notification settings - Fork 107
Conversation
e5047d4
to
fcf1e27
Compare
scripts/config/cassandra.toml
Outdated
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'} | ||
""" | ||
|
||
[cassandra-idx] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
people may use cassandra for the store and not the index, or vice versa, so putting both in the same file seems confusing. hence my original suggestion to have a file for each index plugin and each store plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright. i thought having everything in a single file would make it easier to change things from an admin point of view.
scripts/config/cassandra.toml
Outdated
""" | ||
|
||
[cassandra-idx] | ||
type = "scylladb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this type do, why is it needed and why is it set to scylladb in the cassandra file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing special, it was informative. Moreover the value here is an error during rebase i'll fix this
util/template.go
Outdated
type StoreConfigDatabase struct { | ||
Type string `toml:"type"` | ||
Create_DB_template string `toml:"create_db_template"` | ||
Create_Table_template string `toml:"create_table_template"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as I pointed out in my comment in #888 I don't think we should generalize that a store has 1 createDB and 1 createTable template, it depends on the store
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay i'll make it specific
cmd/mt-index-migrate/main.go
Outdated
@@ -63,8 +63,13 @@ func main() { | |||
log.Fatal(4, "failed to create cql session for destination cassandra. %s", err) | |||
} | |||
|
|||
// read key(space|table) information from templates | |||
var tomlstring = util.FileToString(*cassandraTemplate) | |||
var conf = util.TomlCassandraToVar(tomlstring) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the caller of util shouldn't need to know about toml specifics or about the 2 separate steps.
I suggest instead an api like:
tableSchema, err := util.ReadEntry(*cassandraTemplate, "table-schema")
if err != nil {
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, i'll change this.
44a7a0c
to
4386ce2
Compare
No description provided.