本文整理汇总了Python中cluster.Cluster.clean_bootstrap方法的典型用法代码示例。如果您正苦于以下问题:Python Cluster.clean_bootstrap方法的具体用法?Python Cluster.clean_bootstrap怎么用?Python Cluster.clean_bootstrap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cluster.Cluster
的用法示例。
在下文中一共展示了Cluster.clean_bootstrap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update_test
# 需要导入模块: from cluster import Cluster [as 别名]
# 或者: from cluster.Cluster import clean_bootstrap [as 别名]
def update_test(self):
cluster = Cluster(get_ctool_nodes())
cluster.clean_bootstrap('apache/cassandra-2.1')
[node1, node2] = cluster.get_nodes()
lastkey = self.fillData(10000000000, cluster)
cluster.round_robin_update('apache/trunk')
repout_n1 = cluster.nodetool('repair -hosts ' + node1.get_address(), nodes=[node1], capture_output=True)
repout_n2 = cluster.nodetool('repair -hosts ' + node2.get_address(), nodes=[node2], capture_output=True)
(output1, error1) = repout_n1[0]
(output2, error2) = repout_n1[0]
#check return values of repair is succesful
self.assertEqual(repout_n1[1], 1, str(error1))
self.assertEqual(repout_n2[1], 1, str(error2))
#perform some basic validation to check querying values works
(info, rc)= cluster.stress("read n={numWrites} -pop seq=1..{lastkey} no-wrap".format(numWrites=lastkey, lastkey=lastkey))
#check validation error-free
self.assertEqual(rc, 1)
#check that there are no errors in logs:
self.check_logs(cluster)
示例2: update_test
# 需要导入模块: from cluster import Cluster [as 别名]
# 或者: from cluster.Cluster import clean_bootstrap [as 别名]
def update_test(self):
cluster = Cluster(get_ctool_nodes())
cluster.clean_bootstrap('apache/cassandra-2.1')
[node1, node2] = cluster.get_nodes()
cluster.stress("write n=50000", [node1,node2])
cluster.update('apache/trunk', node1)