尝试从 cql 创建会话时出现以下错误,Error: Consistency level ANY is not supported for this operation. Supported consistency levels are: ONE, LOCAL_QUORUM, LOCAL_ONE我使用过Amazon Managed Apache Cassandra 服务以下是创建会话的代码clusterConfig := gocql.NewCluster("<HOST:PORT>")clusterConfig.Authenticator = gocql.PasswordAuthenticator{Username: "Username", Password: "Password"}clusterConfig.SslOpts = &gocql.SslOptions{CaPath: "./AmazonRootCA1.pem",}clusterConfig.Consistency = gocql.LocalQuorumclusterConfig.ConnectTimeout = time.Second * 10clusterConfig.ProtoVersion = 3clusterConfig.DisableInitialHostLookup = trueclusterConfig.Keyspace = "TestDB"clusterConfig.NumConns = 3session, err := clusterConfig.CreateSession()if err != nil {fmt.Println("err>", err)}return session我将一致性级别设置为LocalQuorum,但仍然给出上述错误。如果有人知道如何解决,请帮助我们
- 1 回答
- 0 关注
- 139 浏览
添加回答
举报
0/150
提交
取消