0

While creating the new index in cassandra by mistake given same directory path(directory_path) for both the indexes which is might be giving error while dropping the indexes. And able to delete other indexes which is pointing to unique different directory paths. Please share your thoughts that how we can delete the new index which was pointed to same directory path of existing index.

New index

CREATE CUSTOM INDEX inbound_idx ON inventory.inbound (p_index) USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = {'schema': '{
        fields : {
            symbol    : {type : "string",case_sensitive: false},
            destination  : {type : "string",case_sensitive: false},
            ticket_id  : {type : "string",case_sensitive: false}

        }
    }', 'refresh_seconds': '1', 'directory_path': '/c05/stratio_index/inventory/inbound'};
CREATE CUSTOM INDEX inbound_idx_new ON inventory.inbound (p_index_new) USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = {'schema': '{
        fields : {
            symbol    : {type : "string",case_sensitive: false},
            destination  : {type : "string",case_sensitive: false},
            ticket_id  : {type : "string",case_sensitive: false}                       
        }
    }', 'refresh_seconds': '1', 'directory_path': '/c05/stratio_index/inventory/inbound'};

Error:

inventory_admin@cqlsh:inventory> drop index inbound_idx_new;
ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
inventory_admin@cqlsh:inventory> drop INDEX inbound_idx;
ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.AssertionError: attempted to delete non-existing file inbound
inventory_admin@cqlsh:inventory> drop index inbound_idx1;
inventory_admin@cqlsh:inventory>
  • is the index listed if you execute `DESCRIBE TABLE inventory.inbound;` in cqlsh? – Carlos Monroy Nieblas Jun 19 '19 at 04:58
  • Yes it is listed out but just now what i observed is in linux file system that folder not exists. if i create that folder then if i try to restart the cassandra, it is not going to up since two indexes are referencing same location at the same time. Due to that getting lock exception on that index while restarting and to make cassandra up we manually deleted the folder. – Kona Laxman Deepak Jun 19 '19 at 05:21
  • Are there any other indexes other than these? If not, you could try to move the contents of the system_schema.indexes directory out of your data_dir and try to restart. That may clear things up. If it doesn't help, move the contents back. – Jim Wartnick Jun 19 '19 at 14:01

0 Answers0