in ccmlib/node.py [0:0]
def stress_process(self, stress_options=None, whitelist=False):
if stress_options is None:
stress_options = []
else:
stress_options = stress_options[:]
stress = common.get_stress_bin(self.get_install_dir())
if self.cluster.cassandra_version() <= '2.1':
stress_options.append('-d')
stress_options.append(self.address())
else:
stress_options.append('-node')
if whitelist:
stress_options.append("whitelist")
stress_options.append(self.address())
# specify used jmx port if not already set
if not [opt for opt in stress_options if opt.startswith('jmx=')]:
stress_options.extend(['-port', 'jmx=' + self.jmx_port])
args = [stress] + stress_options
try:
p = subprocess.Popen(args, cwd=common.parse_path(stress),
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return p
except KeyboardInterrupt:
pass