本文整理汇总了Python中lib.membase.helper.cluster_helper.ClusterOperationHelper.stop_cluster方法的典型用法代码示例。如果您正苦于以下问题:Python ClusterOperationHelper.stop_cluster方法的具体用法?Python ClusterOperationHelper.stop_cluster怎么用?Python ClusterOperationHelper.stop_cluster使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.membase.helper.cluster_helper.ClusterOperationHelper
的用法示例。
在下文中一共展示了ClusterOperationHelper.stop_cluster方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: save_snapshots
# 需要导入模块: from lib.membase.helper.cluster_helper import ClusterOperationHelper [as 别名]
# 或者: from lib.membase.helper.cluster_helper.ClusterOperationHelper import stop_cluster [as 别名]
def save_snapshots(self, file_base, bucket):
"""Save snapshots on all servers"""
if not self.input.servers or not bucket:
self.log.error("invalid server list or bucket name")
return False
ClusterOperationHelper.stop_cluster(self.input.servers)
for server in self.input.servers:
self._save_snapshot(server, bucket, file_base)
ClusterOperationHelper.start_cluster(self.input.servers)
return True
示例2: load_snapshots
# 需要导入模块: from lib.membase.helper.cluster_helper import ClusterOperationHelper [as 别名]
# 或者: from lib.membase.helper.cluster_helper.ClusterOperationHelper import stop_cluster [as 别名]
def load_snapshots(self, file_base, bucket):
"""Load snapshots on all servers"""
if not self.input.servers or not bucket:
print "[perf: load_snapshot] invalid server list or bucket name"
return False
ClusterOperationHelper.stop_cluster(self.input.servers)
for server in self.input.servers:
if not self._load_snapshot(server, bucket, file_base):
ClusterOperationHelper.start_cluster(self.input.servers)
return False
ClusterOperationHelper.start_cluster(self.input.servers)
return True
示例3: set_up_dgm
# 需要导入模块: from lib.membase.helper.cluster_helper import ClusterOperationHelper [as 别名]
# 或者: from lib.membase.helper.cluster_helper.ClusterOperationHelper import stop_cluster [as 别名]
def set_up_dgm(self):
"""Download fragmented, DGM dataset onto each cluster node, if not
already locally available.
The number of vbuckets and database schema must match the
target cluster.
Shutdown all cluster nodes.
Do a cluster-restore.
Restart all cluster nodes."""
bucket = self.param("bucket", "default")
ClusterOperationHelper.stop_cluster(self.input.servers)
for server in self.input.servers:
remote = RemoteMachineShellConnection(server)
#TODO: Better way to pass num_nodes and db_size?
self.get_data_files(remote, bucket, 1, 10)
remote.disconnect()
ClusterOperationHelper.start_cluster(self.input.servers)