felixcheung commented on a change in pull request #24398:
[SPARK-27468][Core][WEBUI] BlockUpdate replication event shouldn't overwrite
storage level description in the UI
URL: https://github.com/apache/spark/pull/24398#discussion_r281002193
##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusListener.scala
##########
@@ -917,8 +917,24 @@ private[spark] class AppStatusListener(
// Update the block entry in the RDD info, keeping track of the deltas
above so that we
// can update the executor information too.
liveRDDs.get(block.rddId).foreach { rdd =>
+
if (updatedStorageLevel.isDefined) {
- rdd.setStorageLevel(updatedStorageLevel.get)
+ // Replicated block update events will have
`storageLevel.replication=1`.
+ // To avoid overwriting the block replicated event in the store, we
need to
+ // have a check for whether the event is block replication or not.
+ // Default value of `storageInfo.replication = 1` and hence if
+ // `storeLevel.replication = 2`, the replicated events won't overwrite
in the store.
+ val storageInfo = rdd.storageInfo
+ val isReplicatedBlockUpdateEvent = storageLevel.replication <
storageInfo.replication &&
Review comment:
check `if (storageLevel.isValid)` before accessing `storageLevel.`*?
----------------------------------------------------------------
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]