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 weather_sensor_data WHERE city='Minneapolis, MN' AND
month=202111;
city | month | recorded_time | temp
-----------------+--------+---------------------------------+------
Minneapolis, MN | 202111 | 2021-11-01 08:35:00.000000+0000 | 3
Minneapolis, MN | 202111 | 2021-11-01 08:30:00.000000+0000 | 3
Minneapolis, MN | 202111 | 2021-11-01 08:25:00.000000+0000 | 2
Minneapolis, MN | 202111 | 2021-11-01 08:20:00.000000+0000 | 2
Minneapolis, MN | 202111 | 2021-11-01 08:15:00.000000+0000 | 2
(5 rows)
Using JMX Term, I've tried to denylist that partition, but I must have the
syntax for composite keys incorrect:
$>bean org.apache.cassandra.db:type=StorageProxy
$>run denylistKey stackoverflow weather_sensor_data "'Minneapolis,
MN',202210"
#IllegalArgumentException: Operation denylistKey with 4 parameters doesn't
exist in bean org.apache.cassandra.db:type=StorageProxy
Obviously, it's reading the space between "Minneapolis," and "MN" as a
delimiter. What's the right way to handle commas, spaces, and composite
keys for this?
Also, is there another way to accomplish this without using JMX?
Thanks,
Aaron