'Remote Popen
:param cmd: command to remotely execute
:param kwargs: extra arguments to Popen (see subprocess.Popen)
:return: handle to subprocess'

def Popen(self, cmd, **kwargs):

    logging.info('Executing    command:    {}'.format('    '.join(cmd)))
    sp = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kwargs)
    for line in iter(sp.stdout):
        logging.info(line.strip())
    sp.wait()
    logging.info('Command    exited    with    return    code    {0}'.format(sp.returncode))
    if sp.returncode:
        raise AirflowException('Sqoop    command    failed:    {}'.format('    '.join(cmd)))
