def _interpret_task_logs(fs, matches, partial=True, log_callback=None):
 result = {}
 syslogs_parsed = set()
 for match in matches:
  error = {}
  if match.get('syslog'):
   stderr_path = match['path']
   syslog_path = match['syslog']['path']
  else:
   stderr_path = None
   syslog_path = match['path']
  if stderr_path:
   if log_callback:
    log_callback(stderr_path)
   task_error = _parse_task_stderr(_cat_log(fs, stderr_path))
   if task_error:
    task_error['path'] = stderr_path
    error['task_error'] = task_error
   else:
    continue
  if (syslog_path in syslogs_parsed):
   continue
  if log_callback:
   log_callback(syslog_path)
  syslog_error = _parse_task_syslog(_cat_log(fs, syslog_path))
  syslogs_parsed.add(syslog_path)
  if (not syslog_error.get('hadoop_error')):
   continue
  error.update(syslog_error)
  error['hadoop_error']['path'] = syslog_path
  for id_key in ('attempt_id', 'container_id'):
   if (id_key in match):
    error[id_key] = match[id_key]
  _add_implied_task_id(error)
  result.setdefault('errors', [])
  result['errors'].append(error)
  if partial:
   result['partial'] = True
   break
 return result

def _interpret_task_logs ( fs , matches , partial = True , log_callback = None ) : result = { } syslogs_parsed = set ( ) for match in matches : error = { } if match . get ( 'syslog' ) : stderr_path = match [ 'path' ] syslog_path = match [ 'syslog' ] [ 'path' ] else : stderr_path = None syslog_path = match [ 'path' ] if stderr_path : if log_callback : log_callback ( stderr_path ) task_error = _parse_task_stderr ( _cat_log ( fs , stderr_path ) ) if task_error : task_error [ 'path' ] = stderr_path error [ 'task_error' ] = task_error else : continue if ( syslog_path in syslogs_parsed ) : continue if log_callback : log_callback ( syslog_path ) syslog_error = _parse_task_syslog ( _cat_log ( fs , syslog_path ) ) syslogs_parsed . add ( syslog_path ) if ( not syslog_error . get ( 'hadoop_error' ) ) : continue error . update ( syslog_error ) error [ 'hadoop_error' ] [ 'path' ] = syslog_path for id_key in ( 'attempt_id' , 'container_id' ) : if ( id_key in match ) : error [ id_key ] = match [ id_key ] _add_implied_task_id ( error ) result . setdefault ( 'errors' , [ ] ) result [ 'errors' ] . append ( error ) if partial : result [ 'partial' ] = True break return result
look for errors in task syslog/stderr .