在一致性LOCAL_QUORUM的写查询期间,Cassandra失败

时间:2016-06-22 04:12:17

标签: java file cassandra load

当我将xml文件写入Cassandra表列时,我面临以下异常。它是一个3节点集群,所有节点都已启动。

com.datastax.driver.core.exceptions.WriteFailureException: Cassandra failure during write query at consistency LOCAL_QUORUM (2 responses were required but only 0 replica responded, 1 failed)
    at com.datastax.driver.core.exceptions.WriteFailureException.copy(WriteFailureException.java:80)
    at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
    at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:245)
    at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:55)
    at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:39)
    at DBConnection.oracle2Cassandra(DBConnection.java:267)
    at DBConnection.main(DBConnection.java:292)
Caused by: com.datastax.driver.core.exceptions.WriteFailureException: Cassandra failure during write query at consistency LOCAL_QUORUM (2 responses were required but only 0 replica responded, 1 failed)
    at com.datastax.driver.core.exceptions.WriteFailureException.copy(WriteFailureException.java:91)
    at com.datastax.driver.core.Responses$Error.asException(Responses.java:119)
    at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:180)
    at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:186)
    at com.datastax.driver.core.RequestHandler.access$2300(RequestHandler.java:44)
    at com.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:754)
    at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:576)

如果有人帮助我摆脱这种情况,那就太好了。感谢

1 个答案:

答案 0 :(得分:0)

然而,我不知道真正的解决方案。

群集节点var / log / cassandra / system.log文件之一。我发现sstable损坏了一张桌子。该表用于抛出异常的代码。

备份表格。 从节点中删除损坏的db文件。 掉落表。 重新创建表。

这对我有用。