def test_find_interesting_hadoop_streaming_error(self): LOG_LINES = [ b'2010-07-27 19:53:22,451 ERROR org.apache.hadoop.streaming.StreamJob (main): Job not Successful!\n', b'2010-07-27 19:53:35,451 ERROR org.apache.hadoop.streaming.StreamJob (main): Error launching job , Output path already exists : Output directory s3://yourbucket/logs/2010/07/23/ already exists and is not empty\n', b'2010-07-27 19:53:52,451 ERROR org.apache.hadoop.streaming.StreamJob (main): Job not Successful!\n', ] self.assertEqual( find_interesting_hadoop_streaming_error(line for line in LOG_LINES), 'Error launching job , Output path already exists : Output directory s3://yourbucket/logs/2010/07/23/ already exists and is not empty')
def test_find_interesting_hadoop_streaming_error(self): LOG_LINES = [ '2010-07-27 19:53:22,451 ERROR org.apache.hadoop.streaming.StreamJob (main): Job not Successful!\n', '2010-07-27 19:53:35,451 ERROR org.apache.hadoop.streaming.StreamJob (main): Error launching job , Output path already exists : Output directory s3://yourbucket/logs/2010/07/23/ already exists and is not empty\n', '2010-07-27 19:53:52,451 ERROR org.apache.hadoop.streaming.StreamJob (main): Job not Successful!\n', ] self.assertEqual( find_interesting_hadoop_streaming_error(line for line in LOG_LINES), 'Error launching job , Output path already exists : Output directory s3://yourbucket/logs/2010/07/23/ already exists and is not empty')
def _hadoop_streaming_error_wrapper(lines): msg = find_interesting_hadoop_streaming_error(lines) return [msg + '\n'] if msg else None
def test_empty(self): self.assertEqual(find_input_uri_for_mapper([]), None) self.assertEqual(find_hadoop_java_stack_trace([]), None) self.assertEqual(find_interesting_hadoop_streaming_error([]), None)
def test_empty(self): self.assertEqual(find_input_uri_for_mapper([]), None) self.assertEqual(find_hadoop_java_stack_trace([]), None) self.assertEqual(find_interesting_hadoop_streaming_error([]), None)
def _hadoop_streaming_error_wrapper(lines): msg = find_interesting_hadoop_streaming_error(lines) return [msg + '\n'] if msg else None
def parse(self, lines): msg = find_interesting_hadoop_streaming_error(lines) if msg: return [msg + '\n'] else: return None
def parse(self, lines): msg = find_interesting_hadoop_streaming_error(lines) if msg: return [msg + '\n'] else: return None