有没有办法找出驱动程序在初始设置过程中最先联系到哪个节点?例如,有没有办法找到所联系的主机10.9.58.64?
WARNING:cassandra.cluster:Cluster.__init__ called with contact_points specified, but no load_balancing_policy. In the next major version, this will raise an error; please specify a load-balancing policy. (contact_points = ['cassandranode1,;cassandranode2'], lbp = None)
DEBUG:cassandra.cluster:Connecting to cluster, contact points: ['cassandranode1,;cassandranode2']; protocol version: 4
DEBUG:cassandra.io.asyncorereactor:Validated loop dispatch with cassandra.io.asyncorereactor._AsyncorePipeDispatcher
DEBUG:cassandra.pool:Host 10.9.58.64 is now marked up
DEBUG:cassandra.pool:Host 10.9.58.65 is now marked up
DEBUG:cassandra.cluster:[control connection] Opening new connection to 10.9.58.64发布于 2021-01-31 00:29:33
在建立连接之后,您可以使用cluster.get_control_connection_host函数来获取有关已建立所谓控制连接的主机的信息。它用于管理目的,例如获取集群中节点状态的更新等。在documentation of Java driver中有更多关于控制连接的信息。
https://stackoverflow.com/questions/65926366
复制相似问题