class Cluster(object):
...
contact_points = ['127.0.0.1']
"""
The list of contact points to try connecting for cluster discovery. A
contact point can be a string (ip or hostname), a tuple (ip/hostname, port) or a
:class:`.connection.EndPoint` instance.
1条答案
按热度按时间0sgqnhkj1#
从DataStax的Python驱动程序v3.27开始,
Cluster
的contact_points
参数似乎接受IP和端口的元组。https://github.com/datastax/python-driver/blob/3.27.0/cassandra/cluster.py#L581-L585
你能做到
然后将
port=
参数保留为空。