Example #1
0
    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')
Example #2
0
    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')
Example #3
0
def _hadoop_streaming_error_wrapper(lines):
    msg = find_interesting_hadoop_streaming_error(lines)
    return [msg + '\n'] if msg else None
Example #4
0
 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)
Example #5
0
 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)
Example #6
0
def _hadoop_streaming_error_wrapper(lines):
    msg = find_interesting_hadoop_streaming_error(lines)
    return [msg + '\n'] if msg else None
Example #7
0
 def parse(self, lines):
     msg = find_interesting_hadoop_streaming_error(lines)
     if msg:
         return [msg + '\n']
     else:
         return None
Example #8
0
 def parse(self, lines):
     msg = find_interesting_hadoop_streaming_error(lines)
     if msg:
         return [msg + '\n']
     else:
         return None