Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19285#discussion_r163525215
--- Diff:
core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala ---
@@ -702,6 +645,83 @@ private[spark] class MemoryStore(
}
}
+private trait ValuesHolder[T] {
+ def storeValue(value: T): Unit
+ def estimatedSize(roughly: Boolean): Long
--- End diff --
this is not a good API design, we can do
```
trait ValuesHolder {
def putValue(value: T)
def estimatedSize: Long
def getBuilder(): ValuesBuilder
}
trait ValuesBuilder {
def preciseSize: Long
def build(): MemoryEntry
}
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]