Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
operating-vehicle
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜发飞
operating-vehicle
Commits
0347cfbd
Commit
0347cfbd
authored
Nov 05, 2019
by
杜发飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
655c5792
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/main/scala/com/hikcreate/data/listener/LifecycleListener.scala
+3
-2
No files found.
src/main/scala/com/hikcreate/data/listener/LifecycleListener.scala
View file @
0347cfbd
...
...
@@ -3,7 +3,7 @@ package com.hikcreate.data.listener
import
com.hikcreate.data.client.EmailClient
import
com.hikcreate.data.common.Logging
import
com.hikcreate.data.constant.ApolloConst
import
org.apache.spark.
{
ExceptionFailure
,
SparkConf
,
TaskFailedReason
,
TaskKilled
}
import
org.apache.spark.
_
import
org.apache.spark.scheduler.
{
SparkListener
,
SparkListenerApplicationEnd
,
SparkListenerApplicationStart
,
SparkListenerTaskEnd
}
import
org.joda.time.DateTime
...
...
@@ -30,9 +30,10 @@ class LifecycleListener(conf:SparkConf) extends SparkListener with Logging {
val
info
=
taskEnd
.
taskInfo
if
(
info
!=
null
&&
taskEnd
.
stageAttemptId
!=
-
1
)
{
val
errorMessage
:
Option
[
String
]
=
taskEnd
.
reason
match
{
case
kill
:
TaskKilled
=>
Some
(
kill
.
toErrorString
)
case
e
:
ExceptionFailure
=>
Some
(
e
.
toErrorString
)
case
e
:
TaskFailedReason
=>
Some
(
e
.
toErrorString
)
case
kill
:
TaskKilled
=>
Some
(
kill
.
toErrorString
)
case
UnknownReason
=>
Some
(
UnknownReason
.
toErrorString
)
case
_
=>
None
}
if
(
errorMessage
.
nonEmpty
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment