在cassandra中删除索引时出错

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

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

  1. CREATE CUSTOM INDEX inbound_idx ON inventory.inbound (p_index) USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = {'schema': '{
  2. fields : {
  3. symbol : {type : "string",case_sensitive: false},
  4. destination : {type : "string",case_sensitive: false},
  5. ticket_id : {type : "string",case_sensitive: false}
  6. }
  7. }', 'refresh_seconds': '1', 'directory_path': '/c05/stratio_index/inventory/inbound'};
  8. CREATE CUSTOM INDEX inbound_idx_new ON inventory.inbound (p_index_new) USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = {'schema': '{
  9. fields : {
  10. symbol : {type : "string",case_sensitive: false},
  11. destination : {type : "string",case_sensitive: false},
  12. ticket_id : {type : "string",case_sensitive: false}
  13. }
  14. }', 'refresh_seconds': '1', 'directory_path': '/c05/stratio_index/inventory/inbound'};

错误:

  1. inventory_admin@cqlsh:inventory> drop index inbound_idx_new;
  2. ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
  3. inventory_admin@cqlsh:inventory> drop INDEX inbound_idx;
  4. 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
  5. inventory_admin@cqlsh:inventory> drop index inbound_idx1;
  6. inventory_admin@cqlsh:inventory>

暂无答案!

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

相关问题