def stress(self, stress_options=None, capture_output=False, whitelist=False,**kwargs):
        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:
            if capture_output:
                p = subprocess.Popen(args, cwd=common.parse_path(stress),
                                     stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                                     **kwargs)
                stdout, stderr = p.communicate()
            else:
                p = subprocess.Popen(args, cwd=common.parse_path(stress),
                                     **kwargs)
                stdout, stderr = None, None
            p.wait()
            return stdout, stderr
        except __HOLE__:
            pass
dataset/ETHPy150Open pcmanus/ccm/ccmlib/node.py/Node.stress