cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9961) cqlsh should have DESCRIBE MATERIALIZED VIEW
Date Wed, 16 Sep 2015 16:07:46 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-9961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14790623#comment-14790623
] 

Benjamin Lerer commented on CASSANDRA-9961:
-------------------------------------------

I made some manual testing and found out that even when a MV has been dropped it still appears
in the {{DESCRIBE}} command. 

{code}
cqlsh> use test;
cqlsh:test> CREATE TABLE scores
        ... (
        ...   user TEXT,
        ...   game TEXT,
        ...   year INT,
        ...   month INT,
        ...   day INT,
        ...   score INT,
        ...   PRIMARY KEY (user, game, year, month, day)
        ... );
cqlsh:test> CREATE MATERIALIZED VIEW alltimehigh AS
        ...        SELECT user FROM scores
        ...        WHERE game IS NOT NULL AND score IS NOT NULL AND user IS NOT NULL AND year
IS NOT NULL AND month IS NOT NULL AND day IS NOT NULL
        ...        PRIMARY KEY (game, score, user, year, month, day)
        ...        WITH CLUSTERING ORDER BY (score desc);
cqlsh:test> drop MATERIALIZED VIEW alltimehigh;
cqlsh:test> describe test;

CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
'1'}  AND durable_writes = true;

CREATE TABLE test.scores (
    user text,
    day int,
    game text,
    month int,
    year int,
    score int,
    PRIMARY KEY (user, day, game, month, year)
) WITH CLUSTERING ORDER BY (day ASC, game ASC, month ASC, year ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
    AND comment = ''
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy',
'max_threshold': '32', 'min_threshold': '4'}
    AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99PERCENTILE';

CREATE MATERIALIZED VIEW test.alltimehigh AS
    SELECT game, day, month, score, user, year
    FROM test.scores
    WHERE game IS NOT NULL AND day IS NOT NULL AND month IS NOT NULL AND score IS NOT NULL
AND user IS NOT NULL AND year IS NOT NULL
    PRIMARY KEY (game, day, month, score, user, year)
    WITH CLUSTERING ORDER BY (day ASC, month ASC, score ASC, user ASC, year ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
    AND comment = ''
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy',
'max_threshold': '32', 'min_threshold': '4'}
    AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99PERCENTILE';;

cqlsh:test> describe MATERIALIZED VIEW alltimehigh;

Materialized view 'alltimehigh' not found
cqlsh:test>
{code}

There is also 2 {{;;}} at the end of the {{DESCRIBE}} result when there is a MV.

> cqlsh should have DESCRIBE MATERIALIZED VIEW
> --------------------------------------------
>
>                 Key: CASSANDRA-9961
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9961
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Carl Yeksigian
>            Assignee: Stefania
>              Labels: client-impacting, materializedviews
>             Fix For: 3.0.0 rc1
>
>
> cqlsh doesn't currently produce describe output that can be used to recreate a MV. Needs
to add a new {{DESCRIBE MATERIALIZED VIEW}} command, and also add to {{DESCRIBE KEYSPACE}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message