本文整理汇总了Python中lib.membase.helper.cluster_helper.ClusterOperationHelper.set_erlang_schedulers方法的典型用法代码示例。如果您正苦于以下问题:Python ClusterOperationHelper.set_erlang_schedulers方法的具体用法?Python ClusterOperationHelper.set_erlang_schedulers怎么用?Python ClusterOperationHelper.set_erlang_schedulers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.membase.helper.cluster_helper.ClusterOperationHelper
的用法示例。
在下文中一共展示了ClusterOperationHelper.set_erlang_schedulers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from lib.membase.helper.cluster_helper import ClusterOperationHelper [as 别名]
# 或者: from lib.membase.helper.cluster_helper.ClusterOperationHelper import set_erlang_schedulers [as 别名]
def setUp(self):
self.setUpBase0()
mc_threads = self.parami("mc_threads", PerfDefaults.mc_threads)
if mc_threads != PerfDefaults.mc_threads:
for node in self.input.servers:
self.set_mc_threads(node, mc_threads)
erlang_schedulers = self.param("erlang_schedulers",
PerfDefaults.erlang_schedulers)
if erlang_schedulers:
ClusterOperationHelper.set_erlang_schedulers(self.input.servers,
erlang_schedulers)
master = self.input.servers[0]
self.is_multi_node = False
self.data_path = master.data_path
# Number of items loaded by load() method.
# Does not include or count any items that came from set_up_dgm().
#
self.num_items_loaded = 0
if self.input.clusters:
for cluster in self.input.clusters.values():
master = cluster[0]
self.set_up_rest(master)
self.set_up_cluster(master)
else:
master = self.input.servers[0]
self.set_up_cluster(master)
# Rebalance
num_nodes = self.parami("num_nodes", 10)
self.rebalance_nodes(num_nodes)
if self.input.clusters:
for cluster in self.input.clusters.values():
master = cluster[0]
self.set_up_rest(master)
self.set_up_buckets()
else:
self.set_up_buckets()
self.set_up_proxy()
if self.input.clusters:
for cluster in self.input.clusters.values():
master = cluster[0]
self.set_up_rest(master)
self.reconfigure()
else:
self.reconfigure()
if self.parami("dgm", getattr(self, "dgm", 1)):
self.set_up_dgm()
time.sleep(10)
self.setUpBase1()
if self.input.clusters:
for cluster in self.input.clusters.values():
self.wait_until_warmed_up(cluster[0])
else:
self.wait_until_warmed_up()
ClusterOperationHelper.flush_os_caches(self.input.servers)