Error while connecting to Cassandra using Java Driver for Apache Cassandra 1.0 from com.example.cassandra

前端 未结 11 576
感动是毒
感动是毒 2020-12-29 21:38

While connecting to Cassandra client using java driver for Cannsandra by DataStax, it is throwing following error..

Exception in thread \"main\" com.datastax

11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-29 22:05

    I had this issue and it was sorted by setting the ReadTimeout in SocketOptions:

    Cluster cluster = Cluster.builder().addContactPoint("localhost").build();
    cluster.getConfiguration().getSocketOptions().setReadTimeoutMillis(HIGHER_TIMEOUT);
    

提交回复
热议问题