Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

mt-update-ttl : use standard store, specify TTL's not tables, auto-create tables + misc #1173

Merged
merged 5 commits into from
Dec 11, 2018

Conversation

Dieterbe
Copy link
Contributor

No description provided.

notes:
* cassandra-concurrency now sets the WriteConcurrency setting,
  to end up at the same behavior of setting .NumConns
* new flags: window-factor, create-keyspace, schema-file
flag.Usage = func() {
fmt.Fprintln(os.Stderr, "mt-update-ttl [flags] ttl table-in [table-out]")
fmt.Fprintln(os.Stderr)
fmt.Fprintln(os.Stderr, "Adjusts the data in Cassandra to use a new TTL value. The TTL is applied counting from the timestamp of the data")
fmt.Fprintln(os.Stderr, "If table-out not specified or same as table-in, will update in place. Otherwise will not touch input table and store results in table-out")
fmt.Fprintln(os.Stderr, "In that case, it is up to you to assure table-out exists before running this tool")
fmt.Fprintln(os.Stderr, "Unless you disable create-keyspace, table-out is created when necessary")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes that table-out is named using the internal naming convention of MT. But there are no checks to ensure that is true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suppose we could check if the table generated for the requested TTL matches the name specified.
but at that point, we may as well get rid of the table-out argument and just always generate it automatically. mt-update-ttl then knows the right destination table without further user input, and even know when to do updates (if it's same as table-in) or copies (if it's different). does that sound good to you @woodsaj ?

Copy link
Member

@woodsaj woodsaj Dec 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems reasonable, but you should then do the same for both the input and out tables. ie old-ttl, new-ttl

@Dieterbe Dieterbe changed the title mt-update-ttl : use standard store, enabling auto table creation mt-update-ttl : use standard store, specify TTL's not tables, auto-create tables + misc Dec 11, 2018
@Dieterbe
Copy link
Contributor Author

@woodsaj PTAL

@Dieterbe Dieterbe merged commit 51042d1 into master Dec 11, 2018
@Dieterbe Dieterbe deleted the mt-update-ttl-updates branch March 27, 2019 21:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants