示例#1
0
文件: mixin.py 项目: Dean838/mrjob
 def _ls_task_syslogs(
         self, application_id=None, job_id=None, output_dir=None):
     """Yield task log matches, logging a message for each one."""
     for match in _ls_task_syslogs(
             self.fs,
             self._stream_task_log_dirs(
                 application_id=application_id, output_dir=output_dir),
             application_id=application_id,
             job_id=job_id):
         log.info('  Parsing task syslog: %s' % match['path'])
         yield match
示例#2
0
 def _ls_task_syslogs(
         self, application_id=None, job_id=None, output_dir=None):
     """Yield task log matches, logging a message for each one."""
     for match in _ls_task_syslogs(
             self.fs,
             self._stream_task_log_dirs(
                 application_id=application_id, output_dir=output_dir),
             application_id=application_id,
             job_id=job_id):
         log.info('  Parsing task syslog: %s' % match['path'])
         yield match
示例#3
0
文件: hadoop.py 项目: imtiaz39/mrjob
            def ls_task_syslogs():
                # there should be at most one history log
                for match in _ls_task_syslogs(
                        self.fs, stream_task_log_dirs(),
                        application_id=application_id, job_id=job_id):

                    # TODO: this isn't really correct because
                    # _interpret_task_logs() sorts the logs paths and
                    # scans starting at the most recent one. Probably
                    # should have _ls_task_syslogs() do the sorting.
                    log.info('  Scanning for errors: %s' % match['path'])
                    yield match
示例#4
0
            def ls_task_syslogs():
                # there should be at most one history log
                for match in _ls_task_syslogs(self.fs,
                                              stream_task_log_dirs(),
                                              application_id=application_id,
                                              job_id=job_id):

                    # TODO: this isn't really correct because
                    # _interpret_task_logs() sorts the logs paths and
                    # scans starting at the most recent one. Probably
                    # should have _ls_task_syslogs() do the sorting.
                    log.info('  Scanning for errors: %s' % match['path'])
                    yield match
示例#5
0
 def mock_path_matches(self):
     mock_log_dir_stream = [['']]  # needed to make _ls_logs() work
     return _ls_task_syslogs(self.mock_fs, mock_log_dir_stream)
示例#6
0
 def mock_path_matches(self):
     mock_log_dir_stream = [['']]  # needed to make _ls_logs() work
     return _ls_task_syslogs(self.mock_fs, mock_log_dir_stream)
示例#7
0
文件: test_task.py 项目: teazj/mrjob
 def mock_path_matches(self):
     mock_log_dir_stream = [['MOCK_LOG_DIR']]  # _ls_logs() needs this
     return _ls_task_syslogs(self.mock_fs, mock_log_dir_stream)