digraph G {
0 [labelType="html" label="<br><b>WriteToDataSourceV2</b><br><br>"];
subgraph cluster1 {
isCluster="true";
label="WholeStageCodegen (7)";
2 [labelType="html" label="<br><b>Sort</b><br><br>"];
}
3 [labelType="html" label="<br><b>Exchange</b><br><br>"];
subgraph cluster4 {
isCluster="true";
label="WholeStageCodegen (6)\n \nduration: total (min, med, max (stageId: taskId))\n166 ms (0 ms, 0 ms, 6 ms (stage 25.0: task 1457))";
5 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build total (min, med, max (stageId: taskId))<br>1 ms (0 ms, 0 ms, 1 ms (stage 25.0: task 1457))<br>peak memory total (min, med, max (stageId: taskId))<br>236.5 MiB (0.0 B, 256.0 KiB, 64.3 MiB (stage 25.0: task 1457))<br>number of output rows: 3<br>avg hash probe bucket list iters (min, med, max (stageId: taskId)):<br>(1, 1, 1 (stage 25.0: task 1457))"];
}
6 [labelType="html" label="<b>StateStoreSave</b><br><br>number of total state rows: 3<br>memory used by state total (min, med, max (stageId: taskId))<br>65.9 KiB (0.0 B, 376.0 B, 576.0 B (stage 25.0: task 1515))<br>count of cache hit on states cache in provider: 356<br>number of output rows: 3<br>estimated size of state only on current version total (min, med, max (stageId: taskId))<br>15.9 KiB (0.0 B, 88.0 B, 288.0 B (stage 25.0: task 1515))<br>time to commit changes total (min, med, max (stageId: taskId))<br>7.9 s (0 ms, 33 ms, 149 ms (stage 25.0: task 1573))<br>time to remove total (min, med, max (stageId: taskId))<br>0 ms (0 ms, 0 ms, 0 ms (stage 25.0: task 1406))<br>number of updated state rows: 3<br>time to update total (min, med, max (stageId: taskId))<br>244 ms (0 ms, 1 ms, 27 ms (stage 25.0: task 1515))"];
subgraph cluster7 {
isCluster="true";
label="WholeStageCodegen (5)\n \nduration: total (min, med, max (stageId: taskId))\n247 ms (0 ms, 1 ms, 27 ms (stage 25.0: task 1515))";
8 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build total (min, med, max (stageId: taskId))<br>0 ms (0 ms, 0 ms, 0 ms (stage 25.0: task 1406))<br>peak memory total (min, med, max (stageId: taskId))<br>44.5 MiB (0.0 B, 256.0 KiB, 256.0 KiB (stage 25.0: task 1406))<br>number of output rows: 3"];
}
9 [labelType="html" label="<b>StateStoreRestore</b><br><br>number of output rows: 3"];
subgraph cluster10 {
isCluster="true";
label="WholeStageCodegen (4)\n \nduration: total (min, med, max (stageId: taskId))\n810 ms (0 ms, 3 ms, 27 ms (stage 25.0: task 1460))";
11 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build total (min, med, max (stageId: taskId))<br>3 ms (0 ms, 0 ms, 2 ms (stage 25.0: task 1530))<br>peak memory total (min, med, max (stageId: taskId))<br>44.5 MiB (0.0 B, 256.0 KiB, 256.0 KiB (stage 25.0: task 1406))<br>number of output rows: 3"];
}
12 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 6<br>shuffle write time total (min, med, max (stageId: taskId))<br>11 ms (4 ms, 6 ms, 6 ms (stage 24.0: task 1399))<br>records read: 6<br>local bytes read total (min, med, max (stageId: taskId))<br>160.0 B (0.0 B, 0.0 B, 160.0 B (stage 25.0: task 1457))<br>fetch wait time total (min, med, max (stageId: taskId))<br>1 ms (0 ms, 0 ms, 1 ms (stage 25.0: task 1530))<br>remote bytes read total (min, med, max (stageId: taskId))<br>336.0 B (0.0 B, 0.0 B, 176.0 B (stage 25.0: task 1515))<br>local blocks read: 2<br>remote blocks read: 4<br>data size total (min, med, max (stageId: taskId))<br>256.0 B (128.0 B, 128.0 B, 128.0 B (stage 24.0: task 1399))<br>shuffle bytes written total (min, med, max (stageId: taskId))<br>496.0 B (248.0 B, 248.0 B, 248.0 B (stage 24.0: task 1399))"];
subgraph cluster13 {
isCluster="true";
label="WholeStageCodegen (3)\n \nduration: total (min, med, max (stageId: taskId))\n18 ms (7 ms, 11 ms, 11 ms (stage 24.0: task 1399))";
14 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build total (min, med, max (stageId: taskId))<br>4 ms (1 ms, 3 ms, 3 ms (stage 24.0: task 1399))<br>peak memory total (min, med, max (stageId: taskId))<br>512.0 KiB (256.0 KiB, 256.0 KiB, 256.0 KiB (stage 24.0: task 1399))<br>number of output rows: 6"];
15 [labelType="html" label="<br><b>Project</b><br><br>"];
}
16 [labelType="html" label="<br><b>EventTimeWatermark</b><br><br>"];
subgraph cluster17 {
isCluster="true";
label="WholeStageCodegen (2)\n \nduration: total (min, med, max (stageId: taskId))\n10 ms (4 ms, 6 ms, 6 ms (stage 24.0: task 1399))";
18 [labelType="html" label="<br><b>Project</b><br><br>"];
19 [labelType="html" label="<b>Filter</b><br><br>number of output rows: 40"];
}
20 [labelType="html" label="<b>Generate</b><br><br>number of output rows: 43"];
subgraph cluster21 {
isCluster="true";
label="WholeStageCodegen (1)\n \nduration: total (min, med, max (stageId: taskId))\n12 ms (5 ms, 7 ms, 7 ms (stage 24.0: task 1399))";
22 [labelType="html" label="<br><b>Project</b><br><br>"];
}
23 [labelType="html" label="<b>MicroBatchScan</b><br><br>number of output rows: 41"];
2->0;
3->2;
5->3;
6->5;
8->6;
9->8;
11->9;
12->11;
14->12;
15->14;
16->15;
18->16;
19->18;
20->19;
22->20;
23->22;
}
24
WriteToDataSourceV2 org.apache.spark.sql.execution.streaming.sources.MicroBatchWrite@30532dd4
Sort [Correct_count#124L DESC NULLS LAST], true, 0
WholeStageCodegen (7)
Exchange rangepartitioning(Correct_count#124L DESC NULLS LAST, 200), true, [id=#862]
HashAggregate(keys=[hostname#14], functions=[count(1)])
WholeStageCodegen (6)
StateStoreSave [hostname#14], state info [ checkpoint = file:/tmp/temporary-f9fb39ce-1caa-4bde-a068-b38acb808fb3/state, runId = 61e1d4d7-e682-42ec-879a-83a32ac478c6, opId = 0, ver = 1, numPartitions = 200], Complete, 0, 2
HashAggregate(keys=[hostname#14], functions=[merge_count(1)])
WholeStageCodegen (5)
StateStoreRestore [hostname#14], state info [ checkpoint = file:/tmp/temporary-f9fb39ce-1caa-4bde-a068-b38acb808fb3/state, runId = 61e1d4d7-e682-42ec-879a-83a32ac478c6, opId = 0, ver = 1, numPartitions = 200], 2
HashAggregate(keys=[hostname#14], functions=[merge_count(1)])
WholeStageCodegen (4)
Exchange hashpartitioning(hostname#14, 200), true, [id=#850]
HashAggregate(keys=[hostname#14], functions=[partial_count(1)])
Project [split(logs#5, ,, -1)[1] AS hostname#14]
WholeStageCodegen (3)
EventTimeWatermark timestamp#1: timestamp, 3 seconds
Project [logs#5, timestamp#1]
Filter ((split(logs#5, ,, -1)[3] = GET) AND (split(logs#5, ,, -1)[5] = 200))
WholeStageCodegen (2)
Generate explode(split(value#0, , -1)), [timestamp#1], false, [logs#5]
Project [value#0, timestamp#1]
WholeStageCodegen (1)
MicroBatchScan[value#0, timestamp#1] class org.apache.spark.sql.execution.streaming.sources.TextSocketTable$$anon$1
== Parsed Logical Plan ==
WriteToDataSourceV2 org.apache.spark.sql.execution.streaming.sources.MicroBatchWrite@30532dd4
+- Sort [Correct_count#124L DESC NULLS LAST], true
+- Project [window#110, count#121L AS Correct_count#124L]
+- Aggregate [hostname#14], [hostname#14 AS window#110, count(1) AS count#121L]
+- Filter ((method#25 = GET) AND (responsecode#40 = 200))
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, time#19, method#25, url#32, responsecode#40, split(logs#5, ,, -1)[6] AS bytes#49]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, time#19, method#25, url#32, split(logs#5, ,, -1)[5] AS responsecode#40]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, time#19, method#25, split(logs#5, ,, -1)[4] AS url#32]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, time#19, split(logs#5, ,, -1)[3] AS method#25]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, split(logs#5, ,, -1)[2] AS time#19]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, split(logs#5, ,, -1)[1] AS hostname#14]
+- Project [logs#5, timestamp#1-T3000ms, split(logs#5, ,, -1)[0] AS idx#10]
+- EventTimeWatermark timestamp#1: timestamp, 3 seconds
+- Project [logs#5, timestamp#1]
+- Generate explode(split(value#0, , -1)), false, [logs#5]
+- StreamingDataSourceV2Relation [value#0, timestamp#1], org.apache.spark.sql.execution.streaming.sources.TextSocketTable$$anon$1@782fdeaa, TextSocketV2[host: stream-emulator.data-science-tools.svc.cluster.local, port: 5551], -1, 40
== Analyzed Logical Plan ==
WriteToDataSourceV2 org.apache.spark.sql.execution.streaming.sources.MicroBatchWrite@30532dd4
+- Sort [Correct_count#124L DESC NULLS LAST], true
+- Project [window#110, count#121L AS Correct_count#124L]
+- Aggregate [hostname#14], [hostname#14 AS window#110, count(1) AS count#121L]
+- Filter ((method#25 = GET) AND (responsecode#40 = 200))
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, time#19, method#25, url#32, responsecode#40, split(logs#5, ,, -1)[6] AS bytes#49]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, time#19, method#25, url#32, split(logs#5, ,, -1)[5] AS responsecode#40]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, time#19, method#25, split(logs#5, ,, -1)[4] AS url#32]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, time#19, split(logs#5, ,, -1)[3] AS method#25]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, hostname#14, split(logs#5, ,, -1)[2] AS time#19]
+- Project [logs#5, timestamp#1-T3000ms, idx#10, split(logs#5, ,, -1)[1] AS hostname#14]
+- Project [logs#5, timestamp#1-T3000ms, split(logs#5, ,, -1)[0] AS idx#10]
+- EventTimeWatermark timestamp#1: timestamp, 3 seconds
+- Project [logs#5, timestamp#1]
+- Generate explode(split(value#0, , -1)), false, [logs#5]
+- StreamingDataSourceV2Relation [value#0, timestamp#1], org.apache.spark.sql.execution.streaming.sources.TextSocketTable$$anon$1@782fdeaa, TextSocketV2[host: stream-emulator.data-science-tools.svc.cluster.local, port: 5551], -1, 40
== Optimized Logical Plan ==
WriteToDataSourceV2 org.apache.spark.sql.execution.streaming.sources.MicroBatchWrite@30532dd4
+- Sort [Correct_count#124L DESC NULLS LAST], true
+- Aggregate [hostname#14], [hostname#14 AS window#110, count(1) AS Correct_count#124L]
+- Project [split(logs#5, ,, -1)[1] AS hostname#14]
+- EventTimeWatermark timestamp#1: timestamp, 3 seconds
+- Project [logs#5, timestamp#1]
+- Filter ((split(logs#5, ,, -1)[3] = GET) AND (split(logs#5, ,, -1)[5] = 200))
+- Generate explode(split(value#0, , -1)), [0], false, [logs#5]
+- StreamingDataSourceV2Relation [value#0, timestamp#1], org.apache.spark.sql.execution.streaming.sources.TextSocketTable$$anon$1@782fdeaa, TextSocketV2[host: stream-emulator.data-science-tools.svc.cluster.local, port: 5551], -1, 40
== Physical Plan ==
WriteToDataSourceV2 org.apache.spark.sql.execution.streaming.sources.MicroBatchWrite@30532dd4
+- *(7) Sort [Correct_count#124L DESC NULLS LAST], true, 0
+- Exchange rangepartitioning(Correct_count#124L DESC NULLS LAST, 200), true, [id=#862]
+- *(6) HashAggregate(keys=[hostname#14], functions=[count(1)], output=[window#110, Correct_count#124L])
+- StateStoreSave [hostname#14], state info [ checkpoint = file:/tmp/temporary-f9fb39ce-1caa-4bde-a068-b38acb808fb3/state, runId = 61e1d4d7-e682-42ec-879a-83a32ac478c6, opId = 0, ver = 1, numPartitions = 200], Complete, 0, 2
+- *(5) HashAggregate(keys=[hostname#14], functions=[merge_count(1)], output=[hostname#14, count#133L])
+- StateStoreRestore [hostname#14], state info [ checkpoint = file:/tmp/temporary-f9fb39ce-1caa-4bde-a068-b38acb808fb3/state, runId = 61e1d4d7-e682-42ec-879a-83a32ac478c6, opId = 0, ver = 1, numPartitions = 200], 2
+- *(4) HashAggregate(keys=[hostname#14], functions=[merge_count(1)], output=[hostname#14, count#133L])
+- Exchange hashpartitioning(hostname#14, 200), true, [id=#850]
+- *(3) HashAggregate(keys=[hostname#14], functions=[partial_count(1)], output=[hostname#14, count#133L])
+- *(3) Project [split(logs#5, ,, -1)[1] AS hostname#14]
+- EventTimeWatermark timestamp#1: timestamp, 3 seconds
+- *(2) Project [logs#5, timestamp#1]
+- *(2) Filter ((split(logs#5, ,, -1)[3] = GET) AND (split(logs#5, ,, -1)[5] = 200))
+- Generate explode(split(value#0, , -1)), [timestamp#1], false, [logs#5]
+- *(1) Project [value#0, timestamp#1]
+- MicroBatchScan[value#0, timestamp#1] class org.apache.spark.sql.execution.streaming.sources.TextSocketTable$$anon$1