是否有一种方法可以找出驱动程序在初始设置期间首先联系的节点?例如,是否有办法找到被联系的主机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
连接建立后,您就可以使用集群了。Get_control_connection_host函数获取关于所谓的控制连接建立的主机的信息。它用于管理目的,例如获取集群中节点状态的更新,等等。Java驱动的文档中有关于控制连接的更多信息。