cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DOAN DuyHai (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-11133) [SASI Pre-QA] Creating SPARSE index with Analyzer fails silently when using =
Date Sun, 07 Feb 2016 13:08:39 GMT
DOAN DuyHai created CASSANDRA-11133:

             Summary: [SASI Pre-QA] Creating SPARSE index with Analyzer fails silently when
using =
                 Key: CASSANDRA-11133
             Project: Cassandra
          Issue Type: Bug
          Components: CQL
         Environment: Tested from build [CASSANDRA-11067|]

            Reporter: DOAN DuyHai

Tested from build [CASSANDRA-11067|]

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

CREATE TABLE music.albums (
    id int PRIMARY KEY,
    artist text,
    title text,
    year int

INSERT INTO music.albums(id, artist, title, year) 
VALUES (1, 'Bullets and Octane', 'In the Mouth of the Young', 2006);

INSERT INTO music.albums(id, artist, title, year) 
VALUES (2, 'Quantic', 'Look Around The Corner', 2012);

INSERT INTO music.albums(id, artist, title, year) 
VALUES (3, 'America', 'View From the Ground', 1982);

CREATE CUSTOM INDEX ON music.albums (year) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = {'mode': 'SPARSE', 'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer'};

SELECT artist,title,year FROM music.albums;

artist             | title                      | year
Bullets and Octane |  In the Mouth of the Young | 2006
           Quantic |     Look Around the Corner | 2012
           America |       View From the Ground | 1982

The index was properly created. It can be found calling *DESCRIBE TABLE albums;* as well as
in *system_schema.indexes*. 

Strangely, the index does not return any data:

SELECT * FROM music.albums WHERE year=2006;

(0 rows)

However range query using the index fails with a cryptic exception:

SELECT * FROM music.albums WHERE year>=1981 AND year<=1990 LIMIT 10;

Traceback (most recent call last):
    File "/opt/apps/apache-cassandra-3.4/bin/", line 1250, in perform_simple_statement
result = future.result()
    File "/opt/apps/apache-cassandra-3.4/bin/../lib/",
line 3122, in result
raise self._final_exception
    ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation failed -
received 0 responses and 1 failures" info={'failures': 1, 'received_responses': 0, 'required_responses':
1, 'consistency': 'ONE'}


The real exception message in _/var/log/cassandra/system.log_ is:

Caused by: java.lang.IllegalArgumentException: null
    at org.apache.cassandra.index.sasi.conf.ColumnIndex.searchMemtable(
    at ~[main/:na]
    at org.apache.cassandra.index.sasi.plan.QueryController.getIndexes(
    at org.apache.cassandra.index.sasi.plan.Operation$Builder.complete(
    at org.apache.cassandra.index.sasi.plan.QueryPlan.analyze( ~[main/:na]
    at org.apache.cassandra.index.sasi.plan.QueryPlan.execute( ~[main/:na]
    at org.apache.cassandra.index.sasi.SASIIndex.lambda$searcherFor$241(
    at org.apache.cassandra.index.sasi.SASIIndex$$Lambda$248/ Source)
    at org.apache.cassandra.db.ReadCommand.executeLocally( ~[main/:na]

This message was sent by Atlassian JIRA

View raw message