def stress(self, stress_options): stress = common.get_stress_bin(self.get_cassandra_dir()) args = [ stress ] + stress_options try: subprocess.call(args) except KeyboardInterrupt: pass
def stress(self, stress_options): stress = common.get_stress_bin(self.get_cassandra_dir()) args = [stress] + stress_options try: subprocess.call(args) except KeyboardInterrupt: pass
def stress(self, cassandra_dir, stress_options): stress = common.get_stress_bin(cassandra_dir) livenodes = [ node.network_interfaces['storage'][0] for node in self.nodes.values() if node.is_live() ] if len(livenodes) == 0: print "No live node" return args = [ stress, '-d', ",".join(livenodes) ] + stress_options try: subprocess.call(args) except KeyboardInterrupt: pass
def stress(self, stress_options): stress = common.get_stress_bin(self.get_cassandra_dir()) livenodes = [ node.network_interfaces['storage'][0] for node in self.nodes.values() if node.is_live() ] if len(livenodes) == 0: print "No live node" return args = [ stress, '-d', ",".join(livenodes) ] + stress_options try: subprocess.call(args) except KeyboardInterrupt: pass return self
def stress(self, stress_options): stress = common.get_stress_bin(self.get_cassandra_dir()) livenodes = [ node.network_interfaces['storage'][0] for node in list(self.nodes.values()) if node.is_live() ] if len(livenodes) == 0: print_("No live node") return args = [ stress, '-d', ",".join(livenodes) ] + stress_options try: # need to set working directory for env on Windows if common.is_win(): subprocess.call(args, cwd=common.parse_path(stress)) else: subprocess.call(args) except KeyboardInterrupt: pass return self
def stress(self, stress_options): stress = common.get_stress_bin(self.get_cassandra_dir()) livenodes = [ node.network_interfaces['storage'][0] for node in self.nodes.values() if node.is_live() ] if len(livenodes) == 0: print "No live node" return args = [stress, '-d', ",".join(livenodes)] + stress_options try: # need to set working directory for env on Windows if common.is_win(): subprocess.call(args, cwd=common.parse_path(stress)) else: subprocess.call(args) except KeyboardInterrupt: pass return self