在cassandra中删除索引时出错

fykwrbwg  于 2021-06-14  发布在  Cassandra
关注(0)|答案(0)|浏览(251)

在cassandra中创建新索引时,错误地为两个索引指定了相同的目录路径(directory_path),这可能会在删除索引时出错。并且能够删除指向不同目录路径的其他索引。请分享您的想法,我们如何删除新的索引,这是指向同一目录路径的现有索引。
新建索引

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'};

错误:

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>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题