2016-06-22 92 views
0

雖然我正在將xml文件寫入Cassandra表列,但我正面臨以下異常。其中3節點羣集和所有節點都已啓動。Cassandra在一致性寫入查詢期間失敗LOCAL_QUORUM

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) 

如果有人幫助我擺脫這種情況,這將是一件好事。謝謝

回答

0

但是我不知道真正的解決方案。

集羣節點var/log/cassandra/system.log文件之一。我發現sstable損壞了一張桌子。該表用於拋出異常的代碼。

獲取表的備份。 從節點中刪除損壞的數據庫文件。 放下桌子。 重新創建表格。

這對我有用。