-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-6197][CORE] handle json exception when hisotry file not finished writing #4927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Test build #28328 has started for PR 4927 at commit
|
cc @srowen, @andrewor14, @viirya |
@liyezhang556520 do you really encounter this problem? Isn't the writing operation atomic? |
Yes, I do encounter the problem, if you use Ctrl+C during tasks finishing, it's easy to happen. |
The writing operation is not atomic. |
And I don't think writing operation is atomic, signals still can iterrupt |
ok, thanks @zsxwing answer the second question. |
Test build #28328 has finished for PR 4927 at commit
|
Test PASSed. |
def replay( | ||
logData: InputStream, | ||
sourceName: String, | ||
sourceTruncated: Boolean = false): Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: let's call this maybeTruncated
? it's not certain that the file is truncated.
Test build #28344 has started for PR 4927 at commit
|
@srowen , thanks for your comments, and I have updated the code. |
try { | ||
replayBus.replay(logInput, eventLogFile) | ||
replayBus.replay(logInput, eventLogFile, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK by me except this line no longer needs to wrap. Maybe see if others have a comment before bothering to update again.
Test build #28345 has started for PR 4927 at commit
|
Test build #28344 has finished for PR 4927 at commit
|
Test PASSed. |
Test build #28345 has finished for PR 4927 at commit
|
Test PASSed. |
Hmm, just being curious, |
@viirya , that is because we need to check whether |
Ah, not notice that. :-) |
@@ -17,6 +17,7 @@ | |||
|
|||
package org.apache.spark.scheduler | |||
|
|||
import com.fasterxml.jackson.core.JsonParseException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import order is wrong. See https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide#SparkCodeStyleGuide-Imports
LGTM except the minor import order problem. |
I can fix the import on merge. |
…ed writing For details, please refer to [SPARK-6197](https://issues.apache.org/jira/browse/SPARK-6197) Author: Zhang, Liye <liye.zhang@intel.com> Closes apache#4927 from liyezhang556520/jsonParseError and squashes the following commits: 5cbdc82 [Zhang, Liye] without unnecessary wrap 2b48831 [Zhang, Liye] small changes with sean owen's comments 2973024 [Zhang, Liye] handle json exception when file not finished writing Conflicts: core/src/main/scala/org/apache/spark/deploy/master/Master.scala
…ed writing For details, please refer to [SPARK-6197](https://issues.apache.org/jira/browse/SPARK-6197) Author: Zhang, Liye <liye.zhang@intel.com> Closes #4927 from liyezhang556520/jsonParseError and squashes the following commits: 5cbdc82 [Zhang, Liye] without unnecessary wrap 2b48831 [Zhang, Liye] small changes with sean owen's comments 2973024 [Zhang, Liye] handle json exception when file not finished writing
For details, please refer to SPARK-6197