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 {
112112 case "SparkListenerApplicationStart" :
113113 SparkListenerApplicationStart sparkListenerApplicationStart = objectMapper .readValue (line ,
114114 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+ }
116121 break ;
117122 case "SparkListenerApplicationEnd" :
118123 SparkListenerApplicationEnd sparkListenerApplicationEnd = objectMapper .readValue (line ,
119124 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+ }
121131 break ;
122132 case "SparkListenerBlockManagerAdded" :
123133 SparkListenerBlockManagerAdded sparkListenerBlockManagerAdded = objectMapper .readValue (line ,
You can’t perform that action at this time.
0 commit comments