Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private[ui] class StoragePage(parent: SparkUITab, store: AppStatusStore) extends
<td>{rdd.storageLevel}
</td>
<td>{rdd.numCachedPartitions.toString}</td>
<td>{"%.0f%%".format(rdd.numCachedPartitions * 100.0 / rdd.numPartitions)}</td>
<td>{"%.2f%%".format(rdd.numCachedPartitions * 100.0 / rdd.numPartitions)}</td>
<td sorttable_customkey={rdd.memoryUsed.toString}>{Utils.bytesToString(rdd.memoryUsed)}</td>
<td sorttable_customkey={rdd.diskUsed.toString} >{Utils.bytesToString(rdd.diskUsed)}</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class StoragePageSuite extends SparkFunSuite {

val rdd2 = new RDDStorageInfo(2,
"rdd2",
10,
5,
1000,
56,
StorageLevel.DISK_ONLY.description,
0L,
200L,
Expand All @@ -58,8 +58,8 @@ class StoragePageSuite extends SparkFunSuite {

val rdd3 = new RDDStorageInfo(3,
"rdd3",
10,
10,
1000,
103,
StorageLevel.MEMORY_AND_DISK_SER.description,
400L,
500L,
Expand Down Expand Up @@ -94,19 +94,20 @@ class StoragePageSuite extends SparkFunSuite {

assert((xmlNodes \\ "tr").size === 3)
assert(((xmlNodes \\ "tr")(0) \\ "td").map(_.text.trim) ===
Seq("1", "rdd1", "Memory Deserialized 1x Replicated", "10", "100%", "100.0 B", "0.0 B"))
Seq("1", "rdd1", "Memory Deserialized 1x Replicated", "10", "100.00%", "100.0 B", "0.0 B"))
// Check the url
assert(((xmlNodes \\ "tr")(0) \\ "td" \ "a")(0).attribute("href").map(_.text) ===
Some("http://localhost:4040/storage/rdd/?id=1"))

assert(((xmlNodes \\ "tr")(1) \\ "td").map(_.text.trim) ===
Seq("2", "rdd2", "Disk Serialized 1x Replicated", "5", "50%", "0.0 B", "200.0 B"))
Seq("2", "rdd2", "Disk Serialized 1x Replicated", "56", "5.60%", "0.0 B", "200.0 B"))
// Check the url
assert(((xmlNodes \\ "tr")(1) \\ "td" \ "a")(0).attribute("href").map(_.text) ===
Some("http://localhost:4040/storage/rdd/?id=2"))

assert(((xmlNodes \\ "tr")(2) \\ "td").map(_.text.trim) ===
Seq("3", "rdd3", "Disk Memory Serialized 1x Replicated", "10", "100%", "400.0 B", "500.0 B"))
Seq("3", "rdd3", "Disk Memory Serialized 1x Replicated", "103", "10.30%", "400.0 B",
"500.0 B"))
// Check the url
assert(((xmlNodes \\ "tr")(2) \\ "td" \ "a")(0).attribute("href").map(_.text) ===
Some("http://localhost:4040/storage/rdd/?id=3"))
Expand Down