Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statement/Schema builders should be extended with Scylla-specific options #166

Closed
avelanarius opened this issue Nov 4, 2022 · 0 comments · Fixed by #203
Closed

Statement/Schema builders should be extended with Scylla-specific options #166

avelanarius opened this issue Nov 4, 2022 · 0 comments · Fixed by #203
Assignees
Labels
enhancement New feature or request

Comments

@avelanarius
Copy link

The existing SchemaBuilder/statement builders facilites allow for convenient creation of Scylla statements. Unfortunately, many of Scylla-specific extensions are missing from those builders.

For example, it's currently not possible to use SchemaBuilder to create a CREATE TABLE statement with per_partition_rate_limit. Trying it:

Statement stmt = SchemaBuilder.createTable("ks.my_table").addPartitionKey("pk", DataType.cint()).withOptions().freeformOption("per_partition_rate_limit",
        "{'max_reads_per_second': 123, 'max_writes_per_second': 456}");

results in creating such a query:

CREATE TABLE [...] WITH per_partition_rate_limit = '{'max_reads_per_second': 123, 'max_writes_per_second': 456}'

And per_partition_rate_limit value dictionary is unnecessarily escaped with ' '.

We should add convenience methods for all Scylla-specific CQL extensions.

Refs #155

@Gor027 Gor027 self-assigned this Mar 4, 2023
Gor027 added a commit to Gor027/java-driver that referenced this issue Mar 4, 2023
Added `maxReadsPerSecond` and `maxWritesPerSecond` options to `TableOptions`
which will allow convenient creation of CREATE and ALTER statements with
rate limit options for read and write operations.
Both maxReadsPerSecond and maxWritesPerSecond are optional - omitting one of
them means "no limit" for that type of operation.

Fixes scylladb#166
@mykaul mykaul added the enhancement New feature or request label Mar 6, 2023
avelanarius pushed a commit to Gor027/java-driver that referenced this issue Jan 5, 2024
Added `maxReadsPerSecond` and `maxWritesPerSecond` options to `TableOptions`
which will allow convenient creation of CREATE and ALTER statements with
rate limit options for read and write operations.
Both maxReadsPerSecond and maxWritesPerSecond are optional - omitting one of
them means "no limit" for that type of operation.

Fixes scylladb#166
avelanarius pushed a commit that referenced this issue Jan 5, 2024
Added `maxReadsPerSecond` and `maxWritesPerSecond` options to `TableOptions`
which will allow convenient creation of CREATE and ALTER statements with
rate limit options for read and write operations.
Both maxReadsPerSecond and maxWritesPerSecond are optional - omitting one of
them means "no limit" for that type of operation.

Fixes #166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants