'Processes the log files and extracts useful information out of it
:param itr: An iterator which iterates over the input of the subprocess'

def _process_log(self, itr):

    for line in itr:
        line = line.strip()
        if (self._is_yarn and (self._connection['deploy_mode'] == 'cluster')):
            match = re.search('(application[0-9_]+)', line)
            if match:
                self._yarn_application_id = match.groups()[0]
        logging.info(line)
