dongjoon-hyun commented on a change in pull request #24966: [SPARK-28157][CORE]
Make SHS clear KVStore LogInfo for the expired blacklist entries
URL: https://github.com/apache/spark/pull/24966#discussion_r297116337
##########
File path:
core/src/test/scala/org/apache/spark/deploy/history/FsHistoryProviderSuite.scala
##########
@@ -1124,15 +1124,13 @@ class FsHistoryProviderSuite extends SparkFunSuite
with Matchers with Logging {
SparkListenerApplicationEnd(5L))
val mockedFs = spy(provider.fs)
doThrow(new AccessControlException("Cannot read accessDenied
file")).when(mockedFs).open(
- argThat((path: Path) => path.getName.toLowerCase(Locale.ROOT) ==
"accessdenied"))
+ argThat((path: Path) => path.getName.toLowerCase(Locale.ROOT) ==
"accessdenied" &&
+ clock.getTimeMillis() < 1533132471 + 24 * 60 * 60 * 1000))
val mockedProvider = spy(provider)
when(mockedProvider.fs).thenReturn(mockedFs)
updateAndCheck(mockedProvider) { list =>
list.size should be(1)
}
- writeFile(accessDenied, true, None,
- SparkListenerApplicationStart("accessDenied", Some("accessDenied"), 1L,
"test", None),
- SparkListenerApplicationEnd(5L))
Review comment:
Previously, this had a wrong assumption that the file size will grow. In
this PR, I removed this assumption and add time condition at line 1128.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]