File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
task-parser/src/main/java/com/oppo/cloud/parser/utils Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -112,12 +112,22 @@ private void parseLine(String line) throws Exception {
112
112
case "SparkListenerApplicationStart" :
113
113
SparkListenerApplicationStart sparkListenerApplicationStart = objectMapper .readValue (line ,
114
114
SparkListenerApplicationStart .class );
115
- this .application .setAppStartTimestamp (sparkListenerApplicationStart .getTime ());
115
+ Long appStartTimestamp = this .application .getAppStartTimestamp ();
116
+ if (appStartTimestamp != null && appStartTimestamp < sparkListenerApplicationStart .getTime ()) {
117
+ this .application .setAppStartTimestamp (appStartTimestamp );
118
+ }else {
119
+ this .application .setAppStartTimestamp (sparkListenerApplicationStart .getTime ());
120
+ }
116
121
break ;
117
122
case "SparkListenerApplicationEnd" :
118
123
SparkListenerApplicationEnd sparkListenerApplicationEnd = objectMapper .readValue (line ,
119
124
SparkListenerApplicationEnd .class );
120
- this .application .setAppEndTimestamp (sparkListenerApplicationEnd .getTime ());
125
+ Long appEndTimestamp = this .application .getAppEndTimestamp ();
126
+ if (appEndTimestamp != null && appEndTimestamp > sparkListenerApplicationEnd .getTime ()){
127
+ this .application .setAppEndTimestamp (appEndTimestamp );
128
+ }else {
129
+ this .application .setAppEndTimestamp (sparkListenerApplicationEnd .getTime ());
130
+ }
121
131
break ;
122
132
case "SparkListenerBlockManagerAdded" :
123
133
SparkListenerBlockManagerAdded sparkListenerBlockManagerAdded = objectMapper .readValue (line ,
You can’t perform that action at this time.
0 commit comments