com.datastax.driver.core.exceptions.invalidqueryexception:未配置的表peers\u v2

hk8txs48  于 2021-06-01  发布在  Cassandra
关注(0)|答案(1)|浏览(520)

我正在开发一个与cassandra连接的spring boot应用程序
这是我的连接设置

spring.data.cassandra.contact-points=localhost
spring.data.cassandra.keyspace-name=sa_tas_db_cassandra
spring.data.cassandra.schema-action=create_if_not_exists
spring.data.cassandra.username=cassandra

我只是使用一个表,我通过一个模型来创建它。下面是什么

import org.springframework.data.cassandra.core.mapping.PrimaryKey
import org.springframework.data.cassandra.core.mapping.Table
import java.time.LocalTime
import java.util.*

@Table
data class CallLog(
    @PrimaryKey
    val callId:UUID,
    val CustomerUsername: String? = null,
    val callDirection: String? = null,
    val callingPartyName:String? = null,
    val callingPartyNumber:String? = null,
    val calledPartyNumber:String? = null,
    val typeOfCall:String? = null,
    val startTime: Date? = null,
    val answerTime: LocalTime? = null,
    val disconnectTime:Date? = null,
    val timeCallForwarded: Date? = null,
    val voicemailSystemAccessNumber:String? = null
)

这就是我的Cassandra计划
我还用newrelic监视我的应用程序,它产生了以下问题

….netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
  io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
…etty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
…tty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321)
…o.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
…netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
…channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
…o.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
….channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
   io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
….channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
  io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
                  io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
….netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
         io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

此错误不影响应用程序的操作,只影响性能
谢谢

64jmpszr

64jmpszr1#

这是支持cassandra 4.0的兼容性测试的一部分,cassandra 4.0将集群中节点的信息存储在一个具有不同名称的表中,因此驱动程序首先假设它针对较新的版本运行,并检查此表,如果它收到错误,则使用旧的 peers table。仅从版本号不可能可靠地检测cassandra节点的特性,这就是为什么显式检查表更好的原因。
相应的代码在这里。

相关问题