@@ -188,23 +188,24 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
188
188
processing.remove(path.getName)
189
189
}
190
190
191
- private val blacklist = new ConcurrentHashMap [String , Long ]
191
+ private val inaccessibleList = new ConcurrentHashMap [String , Long ]
192
192
193
193
// Visible for testing
194
- private [history] def isBlacklisted (path : Path ): Boolean = {
195
- blacklist .containsKey(path.getName)
194
+ private [history] def isAccessible (path : Path ): Boolean = {
195
+ ! inaccessibleList .containsKey(path.getName)
196
196
}
197
197
198
- private def blacklist (path : Path ): Unit = {
199
- blacklist .put(path.getName, clock.getTimeMillis())
198
+ private def markInaccessible (path : Path ): Unit = {
199
+ inaccessibleList .put(path.getName, clock.getTimeMillis())
200
200
}
201
201
202
202
/**
203
- * Removes expired entries in the blacklist, according to the provided `expireTimeInSeconds`.
203
+ * Removes expired entries in the inaccessibleList, according to the provided
204
+ * `expireTimeInSeconds`.
204
205
*/
205
- private def clearBlacklist (expireTimeInSeconds : Long ): Unit = {
206
+ private def clearInaccessibleList (expireTimeInSeconds : Long ): Unit = {
206
207
val expiredThreshold = clock.getTimeMillis() - expireTimeInSeconds * 1000
207
- blacklist .asScala.retain((_, creationTime) => creationTime >= expiredThreshold)
208
+ inaccessibleList .asScala.retain((_, creationTime) => creationTime >= expiredThreshold)
208
209
}
209
210
210
211
private val activeUIs = new mutable.HashMap [(String , Option [String ]), LoadedAppUI ]()
@@ -470,7 +471,7 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
470
471
logDebug(s " Scanning $logDir with lastScanTime== $lastScanTime" )
471
472
472
473
val updated = Option (fs.listStatus(new Path (logDir))).map(_.toSeq).getOrElse(Nil )
473
- .filter { entry => ! isBlacklisted (entry.getPath) }
474
+ .filter { entry => isAccessible (entry.getPath) }
474
475
.filter { entry => ! isProcessing(entry.getPath) }
475
476
.flatMap { entry => EventLogFileReader (fs, entry) }
476
477
.filter { reader =>
@@ -687,8 +688,8 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
687
688
case e : AccessControlException =>
688
689
// We don't have read permissions on the log file
689
690
logWarning(s " Unable to read log $rootPath" , e)
690
- blacklist (rootPath)
691
- // SPARK-28157 We should remove this blacklisted entry from the KVStore
691
+ markInaccessible (rootPath)
692
+ // SPARK-28157 We should remove this inaccessible entry from the KVStore
692
693
// to handle permission-only changes with the same file sizes later.
693
694
listing.delete(classOf [LogInfo ], rootPath.toString)
694
695
case e : Exception =>
@@ -956,8 +957,8 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
956
957
}
957
958
}
958
959
959
- // Clean the blacklist from the expired entries.
960
- clearBlacklist (CLEAN_INTERVAL_S )
960
+ // Clean the inaccessibleList from the expired entries.
961
+ clearInaccessibleList (CLEAN_INTERVAL_S )
961
962
}
962
963
963
964
private def deleteAttemptLogs (
@@ -1334,7 +1335,7 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
1334
1335
1335
1336
private def deleteLog (fs : FileSystem , log : Path ): Boolean = {
1336
1337
var deleted = false
1337
- if (isBlacklisted (log)) {
1338
+ if (! isAccessible (log)) {
1338
1339
logDebug(s " Skipping deleting $log as we don't have permissions on it. " )
1339
1340
} else {
1340
1341
try {
0 commit comments