Re: Denylisting with a composite partition key

2022-10-25 Thread Cheng Wang via user
and yes, you need to set the consistency level to ONE in the cassandra.yaml if it's running in your local machine denylist_consistency_level: ONE On Tue, Oct 25, 2022 at 10:41 AM Cheng Wang wrote: > Awesome! That's great to hear! > Pls feel free to let me know if you have any questions! > > Th

Re: Denylisting with a composite partition key

2022-10-25 Thread Cheng Wang via user
Awesome! That's great to hear! Pls feel free to let me know if you have any questions! Thanks, Cheng On Tue, Oct 25, 2022 at 10:36 AM Aaron Ploetz wrote: > Works! > > So I was running on my *local*, and all of my attempts to add to the > denylist were failing because the denylist_consistency_le

Re: Denylisting with a composite partition key

2022-10-25 Thread Aaron Ploetz
Works! So I was running on my *local*, and all of my attempts to add to the denylist were failing because the denylist_consistency_level was set to QUORUM: WARN [main] 2022-10-25 11:57:27,238 NoSpamLogger.java:108 - Attempting to load denylist and not enough nodes are available for a QUORUM refr

Re: Denylisting with a composite partition key

2022-10-21 Thread Aaron Ploetz
Awesome. Thank you, Cheng! I’ll give this a shot and let you know. Thanks, Aaron > On Oct 21, 2022, at 12:45 AM, Cheng Wang wrote: > >  > Hi Aaron, > > After reading through the code, I finally figured out the issue. So back to > your original question where you failed to run > $>run de

Re: Denylisting with a composite partition key

2022-10-20 Thread Cheng Wang via user
Hi Aaron, After reading through the code, I finally figured out the issue. So back to your original question where you failed to run $>run denylistKey stackoverflow weather_sensor_data "'Minneapolis, MN',202210" #IllegalArgumentException: Operation denylistKey with 4 parameters doesn't exist in be

Re: Denylisting with a composite partition key

2022-10-20 Thread Aaron Ploetz
No worries, Cheng! So I actually pivoted a little and adjusted my example table to use a single integer-based partition key. aaron@cqlsh:stackoverflow> SELECT ks_name, table_name, blobAsint(key) FROM system_distributed.partition_denylist WHERE ks_name='stackoverflow' AND table_name='weather_senso

Re: Denylisting with a composite partition key

2022-10-19 Thread Cheng Wang via user
Hi Aaron, Sorry for the late reply, was dealing with a production issue (maybe another topic for Cassandra Summit :-)). Are you running on your local machine? Then yes, you do need to enable the config for all the following enable_partition_denylist: true enable_denylist_writes: true enable_deny

Re: Denylisting with a composite partition key

2022-10-19 Thread Aaron Ploetz
Just checking, but for this to work, do I have to mess with these settings in the YAML at all? partition_denylist_enabled: true denylist_reads_enabled: true They're commented out by default. Thanks, Aaron On Mon, Oct 17, 2022 at 4:53 PM Aaron Ploetz wrote: > Thanks for the help with the INS

Re: Denylisting with a composite partition key

2022-10-17 Thread Aaron Ploetz
Thanks for the help with the INSERT, Cheng! I'm further along than before. But it still must not be matching up quite right, because I can still select that partition. I have several different combinations of the two keys (and I removed the space) of "Minneapolis,MN" and 202210. Here's what I'v

Re: Denylisting with a composite partition key

2022-10-17 Thread Cheng Wang via user
Another approach is, instead of using $$, you can put additional pair of single quote around the 'Minneapolis, MN' cqlsh> insert into system_distributed.partition_denylist (ks_name, table_name, key) values ('stackoverflow', 'weather_sensor_data', textAsBlob('''Minneapolis, MN'', 202210')); cqlsh>

Re: Denylisting with a composite partition key

2022-10-17 Thread Cheng Wang via user
Hi Aaron, Yes, you can directly insert into the system_distributed.partition_denylist instead of using JMX. Jordan wrote a blog post for denylist https://cassandra.apache.org/_/blog/Apache-Cassandra-4.1-Denylisting-Partitions.html And the syntax error, one way around is to put $$ around like belo

Denylisting with a composite partition key

2022-10-17 Thread Aaron Ploetz
I have this table definition: CREATE TABLE stackoverflow.weather_sensor_data ( city text, month int, recorded_time timestamp, temp float, PRIMARY KEY ((city, month), recorded_time) ) WITH CLUSTERING ORDER BY (recorded_time DESC) Sample data looks like this: > SELECT * FROM we