当前位置: 首页 > 知识库问答 >
问题:

如何在不重新启动cassandra节点的情况下重建sstable?

归俊
2023-03-14

当我在一个节点上做了一个紧凑的工作时,它会抛出以下例外情况:

ERROR [CompactionExecutor:116922] 2016-04-07 12:51:17,291 CassandraDaemon.java:153 - Exception in thread Thread[CompactionExecutor:116922,1,main]
org.apache.cassandra.io.sstable.CorruptSSTableException: org.apache.cassandra.io.compress.CorruptBlockException: (/data1/data/cassandra_uc_log/log_user-2fdda2a03a7f11e58156c78e55b68188/cassandra_uc_log-log_user-ka-7611-Data.db): corruption detected, chunk at 602529 of l
ength 12126.
    at org.apache.cassandra.io.compress.CompressedRandomAccessReader.reBuffer(CompressedRandomAccessReader.java:92) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.io.compress.CompressedThrottledReader.reBuffer(CompressedThrottledReader.java:41) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.io.util.RandomAccessReader.read(RandomAccessReader.java:326) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at java.io.RandomAccessFile.readFully(RandomAccessFile.java:444) ~[na:1.7.0_60]
    at java.io.RandomAccessFile.readFully(RandomAccessFile.java:424) ~[na:1.7.0_60]
    at org.apache.cassandra.io.util.RandomAccessReader.readBytes(RandomAccessReader.java:351) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:348) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.utils.ByteBufferUtil.readWithLength(ByteBufferUtil.java:311) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.db.ColumnSerializer.deserializeColumnBody(ColumnSerializer.java:132) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:86) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.db.AbstractCell$1.computeNext(AbstractCell.java:52) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.db.AbstractCell$1.computeNext(AbstractCell.java:46) ~[apache-cassandra-2.1.2.jar:2.1.2]
    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.io.sstable.SSTableIdentityIterator.hasNext(SSTableIdentityIterator.java:116) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:146) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.utils.MergeIterator$ManyToOne.advance(MergeIterator.java:125) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:99) ~[apache-cassandra-2.1.2.jar:2.1.2]
    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:165) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.db.compaction.LazilyCompactedRow.write(LazilyCompactedRow.java:110) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:200) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.io.sstable.SSTableRewriter.append(SSTableRewriter.java:115) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:183) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:75) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:232) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_60]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_60]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_60]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_60]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_60]
Caused by: org.apache.cassandra.io.compress.CorruptBlockException: (/data1/data/cassandra_uc_log/log_user-2fdda2a03a7f11e58156c78e55b68188/cassandra_uc_log-log_user-ka-7611-Data.db): corruption detected, chunk at 602529 of length 12126.
    at org.apache.cassandra.io.compress.CompressedRandomAccessReader.decompressChunk(CompressedRandomAccessReader.java:112) ~[apache-cassandra-2.1.2.jar:2.1.2]
    at org.apache.cassandra.io.compress.CompressedRandomAccessReader.reBuffer(CompressedRandomAccessReader.java:88) ~[apache-cassandra-2.1.2.jar:2.1.2]
    ... 37 common frames omitted
 Repair session f33a4b10-ffb7-11e5-8fe3-31b2e5b5b0b2 for range (-5651751204441903619,-5621122634670931727] failed with error java.io.IOException: Failed during snapshot creation.

共有1个答案

贺高杰
2023-03-14

恐怕您必须在文件被删除的情况下重新启动节点。下一次,您也可以尝试运行nodetool擦洗,将损坏的sstable放在适当的位置。

您还没有提到您的Cassandra版本,但是假设您在Cassandra 2.1+中使用增量修复,您可能还必须进行完全修复,以防sstable已经处于修复状态。

 类似资料:
  • 问题内容: 我的速度宏正在缓存中,我不希望它们存在……至少不在开发过程中。 我在属性文件中设置了以下属性… …但这似乎并没有解决问题 使用速度属性,如何配置速度以不缓存宏? (我正在使用速度1.6.4) 编辑: 我不认为这条线… …与速度有关 问题答案: 我一直在NVelocity(速度的C#端口)遇到相同的问题。深入研究它们的来源,我发现全局名称空间中宏的重新加载由以下属性控制。 我没有用速度进

  • 我有一个kubernetes集群,安装了保险库(通过头盔图表)。 我想将机密从vault填充到pod中的文件(例如nginx),并每5分钟刷新一次机密。 我使用以下配置对其进行了测试(使用适当的vault策略/后端身份验证): namespace.yaml Service_account.yaml nginx-deployment.yaml 当我将此配置应用于kubernetes集群时,将创建部署

  • 在下面的代码中。有两个倒计时(黄色和红色),当条件改变时,显示屏上显示的倒计时控件将改变,即从黄色切换到红色,反之亦然。 然而,当它切换时,倒计时变为“重新初始化”。例如,假设黄色的初始计时器为60秒,在滴答40秒后,它会下降到剩下20秒。此时,条件改变两次,例如5秒,因此倒数计时器切换为红色并返回黄色。不是从15秒开始计时,而是从60秒开始重新启动。如何防止小部件的这种“重新初始化”,并允许计时

  • 我读了几个类似的问题,这似乎是我能做的最好的。是否可以在dist上启用实时重新加载而无需完全重新启动应用程序? 顺便说一下,我的IDE是IntelliJ。我开始怀疑IntelliJ是否需要排除dist目录。如果是这样的话我会跟进的。

  • 我有一个dockerfile来启动Tomcat。我想从那个dockerfile创建而不运行图像,这样在docker图像中我就可以看到图像了。docker run-it将我登录到容器,但我不想创建容器并登录到它。 我可以通过哪个命令来实现这一点?

  • 我们正在使用JBoss Enterprise Application Platform server(即JBoss EAP 6.1)来开发使用Logback进行日志记录的新web应用程序。我们已经使用JBoss EAP好几个月了,一切都很好。此外,正如您所知,您可以在运行时在JBOSS上部署和取消部署应用程序和配置文件(如mail service.xml),也就是说,无需重新启动服务器。 但是,如