当前位置: 首页>>代码示例>>Python>>正文


Python ClusterOperationHelper.stop_cluster方法代码示例

本文整理汇总了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
开发者ID:,项目名称:,代码行数:16,代码来源:

示例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
开发者ID:mschoch,项目名称:testrunner,代码行数:18,代码来源:perf.py

示例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)
开发者ID:,项目名称:,代码行数:23,代码来源:


注:本文中的lib.membase.helper.cluster_helper.ClusterOperationHelper.stop_cluster方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。