Cassandra重啟報錯 java.lang.ClassCastException -

來源:互聯網
上載者:User
關鍵字 java 重啟 exe

通過CQL創建了若干表格,比如:

CREATE TABLE fileindex(recid Varchar,agentno Varchar,customerno Varchar,recfile Varchar,createtime Varchar, PRIMARY KEY(recid)); CREATE INDEX ON fileindex(agentno); CREATE INDEX ON fileindex(customerno); CREATE INDEX ON fileindex(recfile); CREATE INDEX ON fileindex(createtime);

&HTTP://www.aliyun.com/zixun/aggregation/37954.html">nbsp;然後再表中插入若干資料,運行了一段時間後,重啟Cassandra,報了下面的錯:

java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.nio.ByteBufferat org.apache.cassandra.db.marshal.UTF8Type.compare(UTF8Type.java:27)at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)at java.util.TreeMap.getEntry(TreeMap.java :328)at java.util.TreeMap.containsKey(TreeMap.java:209)at java.util.TreeSet.contains(TreeSet.java:217)at org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:396)at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:187)at org.apache.cassandra.io.sstable.SSTableReader$1.run(SSTableReader.java:225)at java.util.concurrent.Executors$ RunnableAdapter.call(Executors.java:441)at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)at java.util.concurrent.FutureTask.run(FutureTask.java:138)at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java :908)at java.lang.Thread.run(Thread.java:662)java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.nio.ByteBufferat org.apache.cassandra.db.marshal.UTF8Type.compare(UTF8Type.java:27)at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)

找了半天,終於找到答案,原來是Cassandra1.1.1的一個bug(將在Cassandra1.1.2中修復)。

HTTPs://issues.apache.org/jira/browse/CASSANDRA-4331

解決方法就是刪除saved_caches_directory資料夾中的檔,預設位置是/var/lib/cassandra/saved_caches

然後再重啟就沒問題了

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.