Beispiel #1
0
    def test_pre_yarn_job_id_filter(self):
        self.assertEqual(
            _match_task_syslog_path(self.PRE_YARN_PATH, job_id="job_201512232143_0008"),
            dict(attempt_id="attempt_201512232143_0008_m_000001_3"),
        )

        self.assertEqual(_match_task_syslog_path(self.PRE_YARN_PATH, job_id="job_201512232143_0009"), None)
Beispiel #2
0
    def test_yarn_application_id_filter(self):
        self.assertEqual(
            _match_task_syslog_path(self.YARN_PATH, application_id="application_1450486922681_0004"),
            dict(
                application_id="application_1450486922681_0004", container_id="container_1450486922681_0005_01_000003"
            ),
        )

        self.assertEqual(_match_task_syslog_path(self.YARN_PATH, application_id="application_1450486922681_0005"), None)
Beispiel #3
0
    def test_yarn_application_id_filter(self):
        self.assertEqual(
            _match_task_syslog_path(
                self.YARN_PATH,
                application_id='application_1450486922681_0004'),
            dict(application_id='application_1450486922681_0004',
                 container_id='container_1450486922681_0005_01_000003'))

        self.assertEqual(
            _match_task_syslog_path(
                self.YARN_PATH,
                application_id='application_1450486922681_0005'), None)
Beispiel #4
0
    def test_pre_yarn_job_id_filter(self):
        self.assertEqual(
            _match_task_syslog_path(
                self.PRE_YARN_PATH,
                job_id='job_201512232143_0008'),
            dict(attempt_id='attempt_201512232143_0008_m_000001_3'))

        self.assertEqual(
            _match_task_syslog_path(
                self.PRE_YARN_PATH,
                job_id='job_201512232143_0009'),
            None)
Beispiel #5
0
 def test_yarn_gz(self):
     self.assertEqual(
         _match_task_syslog_path(self.YARN_PATH + ".gz"),
         dict(
             application_id="application_1450486922681_0004", container_id="container_1450486922681_0005_01_000003"
         ),
     )
Beispiel #6
0
 def test_dont_match_yarn_stderr(self):
     self.assertEqual(
         _match_task_syslog_path(self.YARN_PATH[:-6] + 'stderr'),
         None)
Beispiel #7
0
 def test_yarn_gz(self):
     self.assertEqual(
         _match_task_syslog_path(self.YARN_PATH + '.gz'),
         dict(application_id='application_1450486922681_0004',
              container_id='container_1450486922681_0005_01_000003'))
Beispiel #8
0
 def test_pre_yarn_gz(self):
     self.assertEqual(
         _match_task_syslog_path(self.PRE_YARN_PATH + '.gz'),
         dict(attempt_id='attempt_201512232143_0008_m_000001_3'))
Beispiel #9
0
 def test_empty(self):
     self.assertEqual(_match_task_syslog_path(''), None)
Beispiel #10
0
 def test_dont_match_yarn_stderr(self):
     self.assertEqual(
         _match_task_syslog_path(self.YARN_PATH[:-6] + 'stderr'),
         None)
Beispiel #11
0
 def test_yarn_gz(self):
     self.assertEqual(
         _match_task_syslog_path(self.YARN_PATH + '.gz'),
         dict(application_id='application_1450486922681_0004',
              container_id='container_1450486922681_0005_01_000003'))
Beispiel #12
0
 def test_pre_yarn_gz(self):
     self.assertEqual(
         _match_task_syslog_path(self.PRE_YARN_PATH + '.gz'),
         dict(attempt_id='attempt_201512232143_0008_m_000001_3'))
Beispiel #13
0
 def test_empty(self):
     self.assertEqual(_match_task_syslog_path(''), None)
Beispiel #14
0
 def test_dont_match_pre_yarn_stderr(self):
     self.assertEqual(_match_task_syslog_path(self.PRE_YARN_PATH[:-6] + "stderr"), None)
Beispiel #15
0
 def test_pre_yarn(self):
     self.assertEqual(
         _match_task_syslog_path(self.PRE_YARN_PATH), dict(attempt_id="attempt_201512232143_0008_m_000001_3")
     )