[SPARK-30481][CORE][FOLLOWUP] Execute log compaction only when merge application listing is successful#27408
Conversation
|
Hi, @HeartSaVioR . If you don't mind, could you revise the PR title more specifically? The current title repeats SPARK-30481 twice and
|
|
Test build #117589 has finished for PR 27408 at commit
|
|
Thanks @dongjoon-hyun I just updated the title to describe one of issue. Other is really minor and don't think we should ever need to mention it. |
|
Thanks! |
| case None => // This is not applied to single event log file. | ||
| } | ||
| } catch { | ||
| case e: Exception => logError(s"Exception while compacting log for $rootPath", e) |
There was a problem hiding this comment.
ERROR level seems to be very high. Can we lower the log level, WARN? This is printed at every period, isn't it?
There was a problem hiding this comment.
That's consistent with existing exception handling for mergeApplicationListing.
compact is even executed only when mergeApplicationListing succeeds, which would prune many of possible error cases for compact, so less possible to be logged.
If we feel the log level of both are too high, I'll change both altogether. WDYT?
There was a problem hiding this comment.
The above error handling is more fine-grained than this PR.
For example, AccessControlException is the one which most users will hit frequently with this feature. (That's the reason why I asked at the documentation.) For AccessControlException, the above code shows logWarning instead of logError. That seems to be the difference between your and my perspectives.
Let's see @vanzin or other people's opinion.
There was a problem hiding this comment.
Ah that's good point. I agree with you that mergeApplicationListing has more fine-grained exception handling and I even think compact should have same handling except blacklisting. Let me fix it.
There was a problem hiding this comment.
+1, LGTM. Thank you, @HeartSaVioR .
Pending Jenkins.
|
Test build #117610 has finished for PR 27408 at commit
|
|
Merged to master. |
|
Thanks for reviewing and merging! |
What changes were proposed in this pull request?
This PR fixes a couple of minor issues on SPARK-30481:
If "merge application listing" fails, most likely the application log will have some issue and "compaction" won't work properly then. We can just skip trying compaction when "merge application listing" fails.
It's expected to swallow exception, but we don't even log the exception for now. It should be logged properly.
Why are the changes needed?
Described in above section.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing UTs.