我一直在遇到3節點,RF 3,Cassandra 2.1.16集羣的問題,並會盡可能準確地描述它們,考慮到我現在掌握的知識。我該如何修復Cassandra RuntimeException:[hash]未被定義爲集合?
添加一個新行到表兩種:
a)不復制到節點3,直到我做了nodetool維修或
二)複製一行到節點3,但留下了一些列用null或過時的值。
可能不相關,但這似乎發生在您首次插入的行中,然後執行讀取和寫入操作,而不是僅附加表中。
我知道Cassandra不喜歡重複使用列名或模式名,如another question中所解釋的,我調整了我的交付管道以創建新命名的結構,並且似乎存在鬆散耦合的關係數據和模式之間 - 有時模式不匹配數據。
我增加了一些新的表和列到現有的表,現在我有這個來了一對夫婦在節點3分鐘而已,顯然與壓實相關:
INFO [CompactionExecutor:48525] 2017-03-27 11:08:04,851 CompactionTask.java:141 - Compacting [SSTableReader(path='/var/lib/cassandra/data/system/compactions_in_progress-55080ab05d9c388690a4acb25fe1f77b/system-compactions_in_progress-ka-7719-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/compactions_in_progress-55080ab05d9c388690a4acb25fe1f77b/system-compactions_in_progress-ka-7722-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/compactions_in_progress-55080ab05d9c388690a4acb25fe1f77b/system-compactions_in_progress-ka-7721-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/compactions_in_progress-55080ab05d9c388690a4acb25fe1f77b/system-compactions_in_progress-ka-7720-Data.db')]
INFO [CompactionExecutor:48524] 2017-03-27 11:08:04,851 CompactionTask.java:141 - Compacting [SSTableReader(path='/var/lib/cassandra/data/KEYSPACE/TABLENAME-f8195440e63a11e6bfad753f1c36fea2/KEYSPACE-TABLENAME-ka-3-Data.db'), SSTableReader(path='/var/lib/cassandra/data/KEYSPACE/TABLENAME-f8195440e63a11e6bfad753f1c36fea2/KEYSPACE-TABLENAME-ka-1-Data.db'), SSTableReader(path='/var/lib/cassandra/data/KEYSPACE/TABLENAME-f8195440e63a11e6bfad753f1c36fea2/KEYSPACE-TABLENAME-ka-2-Data.db'), SSTableReader(path='/var/lib/cassandra/data/KEYSPACE/TABLENAME-f8195440e63a11e6bfad753f1c36fea2/KEYSPACE-TABLENAME-ka-5-Data.db'), SSTableReader(path='/var/lib/cassandra/data/KEYSPACE/TABLENAME-f8195440e63a11e6bfad753f1c36fea2/KEYSPACE-TABLENAME-ka-4-Data.db'), SSTableReader(path='/var/lib/cassandra/data/KEYSPACE/TABLENAME-f8195440e63a11e6bfad753f1c36fea2/KEYSPACE-TABLENAME-ka-462-Data.db')]
INFO [CompactionExecutor:48525] 2017-03-27 11:08:04,866 CompactionTask.java:274 - Compacted 4 sstables to [/var/lib/cassandra/data/system/compactions_in_progress-55080ab05d9c388690a4acb25fe1f77b/system-compactions_in_progress-ka-7723,]. 476 bytes to 185 (~38% of original) in 14ms = 0.012602MB/s. 3 total partitions merged to 1. Partition merge counts were {1:1, 2:1, }
INFO [CompactionExecutor:48524] 2017-03-27 11:08:04,934 ColumnFamilyStore.java:917 - Enqueuing flush of compactions_in_progress: 148 (0%) on-heap, 20 (0%) off-heap
INFO [MemtableFlushWriter:6333] 2017-03-27 11:08:04,934 Memtable.java:347 - Writing [email protected](0.008KiB serialized bytes, 1 ops, 0%/0% of on/off-heap limit)
INFO [MemtableFlushWriter:6333] 2017-03-27 11:08:04,935 Memtable.java:382 - Completed flushing /var/lib/cassandra/data/system/compactions_in_progress-55080ab05d9c388690a4acb25fe1f77b/system-compactions_in_progress-tmp-ka-7724-Data.db (0.000KiB) for commitlog position ReplayPosition(segmentId=1485986982740, position=11004802)
ERROR [CompactionExecutor:48524] 2017-03-27 11:08:04,954 CassandraDaemon.java:231 - Exception in thread Thread[CompactionExecutor:48524,1,main]
java.lang.RuntimeException: 6865617274707265736372697074696f6e73 is not defined as a collection
at org.apache.cassandra.db.marshal.ColumnToCollectionType.compareCollectionMembers(ColumnToCollectionType.java:72) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.db.composites.CompoundSparseCellNameType$WithCollection.compare(CompoundSparseCellNameType.java:287) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.db.composites.AbstractCellNameType$4.compare(AbstractCellNameType.java:82) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.db.composites.AbstractCellNameType$4.compare(AbstractCellNameType.java:79) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.utils.MergeIterator$Candidate.compareTo(MergeIterator.java:154) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.utils.MergeIterator$Candidate.compareTo(MergeIterator.java:131) ~[apache-cassandra-2.1.16.jar:2.1.16]
at java.util.PriorityQueue.siftUpComparable(PriorityQueue.java:656) ~[na:1.8.0_121]
at java.util.PriorityQueue.siftUp(PriorityQueue.java:647) ~[na:1.8.0_121]
at java.util.PriorityQueue.offer(PriorityQueue.java:344) ~[na:1.8.0_121]
at java.util.PriorityQueue.add(PriorityQueue.java:321) ~[na:1.8.0_121]
at org.apache.cassandra.utils.MergeIterator$ManyToOne.advance(MergeIterator.java:126) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:99) ~[apache-cassandra-2.1.16.jar:2.1.16]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-16.0.jar:na]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-16.0.jar:na]
at com.google.common.collect.Iterators$7.computeNext(Iterators.java:645) ~[guava-16.0.jar:na]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-16.0.jar:na]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-16.0.jar:na]
at org.apache.cassandra.db.ColumnIndex$Builder.buildForCompaction(ColumnIndex.java:174) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.db.compaction.LazilyCompactedRow.write(LazilyCompactedRow.java:121) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:193) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.io.sstable.SSTableRewriter.append(SSTableRewriter.java:127) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:197) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:73) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) ~[apache-cassandra-2.1.16.jar:2.1.16]
at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionCandidate.run(CompactionManager.java:264) ~[apache-cassandra-2.1.16.jar:2.1.16]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
我甩了「形容keyspace KEYSPACENAME;「從每個節點到一個文件並做了diff,所有3個文件都是相同的。還在每個節點上進行了節點工具修復。
在附註中,在對錶格做出更改後,我發現了一些大規模的時鐘漂移(4-15秒),然後通過將節點作爲ntp對等節點來修復ntp服務配置。
'nodetool describecluster'報告3個節點上的模式版本相同。該問題似乎與2017年7月4日提交的[CASSANDRA-13661錯誤](https://issues.apache.org/jira/browse/CASSANDRA-13661)有關。 – HelpfulPanda
它的解決方案是什麼? –
我沒有得到它從問題作者確認,但它看起來像滾動重啓幫助他。 –