Skip to content
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

[SPARK-33283][CORE] Remove useless externalBlockStoreSize from RDDInfo #30179

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions core/src/main/scala/org/apache/spark/rdd/RDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1919,9 +1919,8 @@ abstract class RDD[T: ClassTag](

val persistence = if (storageLevel != StorageLevel.NONE) storageLevel.description else ""
val storageInfo = rdd.context.getRDDStorageInfo(_.id == rdd.id).map(info =>
" CachedPartitions: %d; MemorySize: %s; ExternalBlockStoreSize: %s; DiskSize: %s".format(
info.numCachedPartitions, bytesToString(info.memSize),
bytesToString(info.externalBlockStoreSize), bytesToString(info.diskSize)))
" CachedPartitions: %d; MemorySize: %s; DiskSize: %s".format(
info.numCachedPartitions, bytesToString(info.memSize), bytesToString(info.diskSize)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


s"$rdd [$persistence]" +: storageInfo
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,6 @@ private[spark] class BlockManagerInfo(
if (storageLevel.isValid) {
/* isValid means it is either stored in-memory or on-disk.
* The memSize here indicates the data size in or dropped from memory,
* externalBlockStoreSize here indicates the data size in or dropped from externalBlockStore,
* and the diskSize here indicates the data size in or dropped to disk.
* They can be both larger than 0, when a block is dropped from memory to disk.
* Therefore, a safe way to set BlockStatus is to set its info in accurate modes. */
Expand Down
1 change: 0 additions & 1 deletion core/src/main/scala/org/apache/spark/storage/RDDInfo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class RDDInfo(
var numCachedPartitions = 0
var memSize = 0L
var diskSize = 0L
var externalBlockStoreSize = 0L

def isCached: Boolean = (memSize + diskSize > 0) && numCachedPartitions > 0

Expand Down