aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/resources/HistoryServerExpectations
diff options
context:
space:
mode:
authorjerryshao <sshao@hortonworks.com>2017-04-06 13:23:54 -0500
committerImran Rashid <irashid@cloudera.com>2017-04-06 13:23:54 -0500
commita4491626ed8169f0162a0dfb78736c9b9e7fb434 (patch)
treec18ac0eeba2cb1e95ef6a6a2dee2a9c16ec31174 /core/src/test/resources/HistoryServerExpectations
parent5a693b4138d4ce948e3bcdbe28d5c01d5deb8fa9 (diff)
downloadspark-a4491626ed8169f0162a0dfb78736c9b9e7fb434.tar.gz
spark-a4491626ed8169f0162a0dfb78736c9b9e7fb434.tar.bz2
spark-a4491626ed8169f0162a0dfb78736c9b9e7fb434.zip
[SPARK-17019][CORE] Expose on-heap and off-heap memory usage in various places
## What changes were proposed in this pull request? With [SPARK-13992](https://issues.apache.org/jira/browse/SPARK-13992), Spark supports persisting data into off-heap memory, but the usage of on-heap and off-heap memory is not exposed currently, it is not so convenient for user to monitor and profile, so here propose to expose off-heap memory as well as on-heap memory usage in various places: 1. Spark UI's executor page will display both on-heap and off-heap memory usage. 2. REST request returns both on-heap and off-heap memory. 3. Also this can be gotten from MetricsSystem. 4. Last this usage can be obtained programmatically from SparkListener. Attach the UI changes: ![screen shot 2016-08-12 at 11 20 44 am](https://cloud.githubusercontent.com/assets/850797/17612032/6c2f4480-607f-11e6-82e8-a27fb8cbb4ae.png) Backward compatibility is also considered for event-log and REST API. Old event log can still be replayed with off-heap usage displayed as 0. For REST API, only adds the new fields, so JSON backward compatibility can still be kept. ## How was this patch tested? Unit test added and manual verification. Author: jerryshao <sshao@hortonworks.com> Closes #14617 from jerryshao/SPARK-17019.
Diffstat (limited to 'core/src/test/resources/HistoryServerExpectations')
-rw-r--r--core/src/test/resources/HistoryServerExpectations/executor_memory_usage_expectation.json139
-rw-r--r--core/src/test/resources/HistoryServerExpectations/executor_node_blacklisting_expectation.json41
2 files changed, 170 insertions, 10 deletions
diff --git a/core/src/test/resources/HistoryServerExpectations/executor_memory_usage_expectation.json b/core/src/test/resources/HistoryServerExpectations/executor_memory_usage_expectation.json
new file mode 100644
index 0000000000..e732af2663
--- /dev/null
+++ b/core/src/test/resources/HistoryServerExpectations/executor_memory_usage_expectation.json
@@ -0,0 +1,139 @@
+[ {
+ "id" : "2",
+ "hostPort" : "172.22.0.167:51487",
+ "isActive" : true,
+ "rddBlocks" : 0,
+ "memoryUsed" : 0,
+ "diskUsed" : 0,
+ "totalCores" : 4,
+ "maxTasks" : 4,
+ "activeTasks" : 0,
+ "failedTasks" : 4,
+ "completedTasks" : 0,
+ "totalTasks" : 4,
+ "totalDuration" : 2537,
+ "totalGCTime" : 88,
+ "totalInputBytes" : 0,
+ "totalShuffleRead" : 0,
+ "totalShuffleWrite" : 0,
+ "isBlacklisted" : true,
+ "maxMemory" : 908381388,
+ "executorLogs" : {
+ "stdout" : "http://172.22.0.167:51469/logPage/?appId=app-20161116163331-0000&executorId=2&logType=stdout",
+ "stderr" : "http://172.22.0.167:51469/logPage/?appId=app-20161116163331-0000&executorId=2&logType=stderr"
+ },
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
+}, {
+ "id" : "driver",
+ "hostPort" : "172.22.0.167:51475",
+ "isActive" : true,
+ "rddBlocks" : 0,
+ "memoryUsed" : 0,
+ "diskUsed" : 0,
+ "totalCores" : 0,
+ "maxTasks" : 0,
+ "activeTasks" : 0,
+ "failedTasks" : 0,
+ "completedTasks" : 0,
+ "totalTasks" : 0,
+ "totalDuration" : 0,
+ "totalGCTime" : 0,
+ "totalInputBytes" : 0,
+ "totalShuffleRead" : 0,
+ "totalShuffleWrite" : 0,
+ "isBlacklisted" : true,
+ "maxMemory" : 908381388,
+ "executorLogs" : { },
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
+}, {
+ "id" : "1",
+ "hostPort" : "172.22.0.167:51490",
+ "isActive" : true,
+ "rddBlocks" : 0,
+ "memoryUsed" : 0,
+ "diskUsed" : 0,
+ "totalCores" : 4,
+ "maxTasks" : 4,
+ "activeTasks" : 0,
+ "failedTasks" : 0,
+ "completedTasks" : 4,
+ "totalTasks" : 4,
+ "totalDuration" : 3152,
+ "totalGCTime" : 68,
+ "totalInputBytes" : 0,
+ "totalShuffleRead" : 0,
+ "totalShuffleWrite" : 0,
+ "isBlacklisted" : true,
+ "maxMemory" : 908381388,
+ "executorLogs" : {
+ "stdout" : "http://172.22.0.167:51467/logPage/?appId=app-20161116163331-0000&executorId=1&logType=stdout",
+ "stderr" : "http://172.22.0.167:51467/logPage/?appId=app-20161116163331-0000&executorId=1&logType=stderr"
+ },
+
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
+}, {
+ "id" : "0",
+ "hostPort" : "172.22.0.167:51491",
+ "isActive" : true,
+ "rddBlocks" : 0,
+ "memoryUsed" : 0,
+ "diskUsed" : 0,
+ "totalCores" : 4,
+ "maxTasks" : 4,
+ "activeTasks" : 0,
+ "failedTasks" : 4,
+ "completedTasks" : 0,
+ "totalTasks" : 4,
+ "totalDuration" : 2551,
+ "totalGCTime" : 116,
+ "totalInputBytes" : 0,
+ "totalShuffleRead" : 0,
+ "totalShuffleWrite" : 0,
+ "isBlacklisted" : true,
+ "maxMemory" : 908381388,
+ "executorLogs" : {
+ "stdout" : "http://172.22.0.167:51465/logPage/?appId=app-20161116163331-0000&executorId=0&logType=stdout",
+ "stderr" : "http://172.22.0.167:51465/logPage/?appId=app-20161116163331-0000&executorId=0&logType=stderr"
+ },
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
+}, {
+ "id" : "3",
+ "hostPort" : "172.22.0.167:51485",
+ "isActive" : true,
+ "rddBlocks" : 0,
+ "memoryUsed" : 0,
+ "diskUsed" : 0,
+ "totalCores" : 4,
+ "maxTasks" : 4,
+ "activeTasks" : 0,
+ "failedTasks" : 0,
+ "completedTasks" : 12,
+ "totalTasks" : 12,
+ "totalDuration" : 2453,
+ "totalGCTime" : 72,
+ "totalInputBytes" : 0,
+ "totalShuffleRead" : 0,
+ "totalShuffleWrite" : 0,
+ "isBlacklisted" : true,
+ "maxMemory" : 908381388,
+ "executorLogs" : {
+ "stdout" : "http://172.22.0.167:51466/logPage/?appId=app-20161116163331-0000&executorId=3&logType=stdout",
+ "stderr" : "http://172.22.0.167:51466/logPage/?appId=app-20161116163331-0000&executorId=3&logType=stderr"
+ },
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
+} ]
diff --git a/core/src/test/resources/HistoryServerExpectations/executor_node_blacklisting_expectation.json b/core/src/test/resources/HistoryServerExpectations/executor_node_blacklisting_expectation.json
index 5914a1c2c4..e732af2663 100644
--- a/core/src/test/resources/HistoryServerExpectations/executor_node_blacklisting_expectation.json
+++ b/core/src/test/resources/HistoryServerExpectations/executor_node_blacklisting_expectation.json
@@ -17,11 +17,15 @@
"totalShuffleRead" : 0,
"totalShuffleWrite" : 0,
"isBlacklisted" : true,
- "maxMemory" : 384093388,
+ "maxMemory" : 908381388,
"executorLogs" : {
"stdout" : "http://172.22.0.167:51469/logPage/?appId=app-20161116163331-0000&executorId=2&logType=stdout",
"stderr" : "http://172.22.0.167:51469/logPage/?appId=app-20161116163331-0000&executorId=2&logType=stderr"
- }
+ },
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
}, {
"id" : "driver",
"hostPort" : "172.22.0.167:51475",
@@ -41,8 +45,12 @@
"totalShuffleRead" : 0,
"totalShuffleWrite" : 0,
"isBlacklisted" : true,
- "maxMemory" : 384093388,
- "executorLogs" : { }
+ "maxMemory" : 908381388,
+ "executorLogs" : { },
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
}, {
"id" : "1",
"hostPort" : "172.22.0.167:51490",
@@ -62,11 +70,16 @@
"totalShuffleRead" : 0,
"totalShuffleWrite" : 0,
"isBlacklisted" : true,
- "maxMemory" : 384093388,
+ "maxMemory" : 908381388,
"executorLogs" : {
"stdout" : "http://172.22.0.167:51467/logPage/?appId=app-20161116163331-0000&executorId=1&logType=stdout",
"stderr" : "http://172.22.0.167:51467/logPage/?appId=app-20161116163331-0000&executorId=1&logType=stderr"
- }
+ },
+
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
}, {
"id" : "0",
"hostPort" : "172.22.0.167:51491",
@@ -86,11 +99,15 @@
"totalShuffleRead" : 0,
"totalShuffleWrite" : 0,
"isBlacklisted" : true,
- "maxMemory" : 384093388,
+ "maxMemory" : 908381388,
"executorLogs" : {
"stdout" : "http://172.22.0.167:51465/logPage/?appId=app-20161116163331-0000&executorId=0&logType=stdout",
"stderr" : "http://172.22.0.167:51465/logPage/?appId=app-20161116163331-0000&executorId=0&logType=stderr"
- }
+ },
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
}, {
"id" : "3",
"hostPort" : "172.22.0.167:51485",
@@ -110,9 +127,13 @@
"totalShuffleRead" : 0,
"totalShuffleWrite" : 0,
"isBlacklisted" : true,
- "maxMemory" : 384093388,
+ "maxMemory" : 908381388,
"executorLogs" : {
"stdout" : "http://172.22.0.167:51466/logPage/?appId=app-20161116163331-0000&executorId=3&logType=stdout",
"stderr" : "http://172.22.0.167:51466/logPage/?appId=app-20161116163331-0000&executorId=3&logType=stderr"
- }
+ },
+ "onHeapMemoryUsed" : 0,
+ "offHeapMemoryUsed" : 0,
+ "maxOnHeapMemory" : 384093388,
+ "maxOffHeapMemory" : 524288000
} ]