Commit 0155693
[SPARK-11805] free the array in UnsafeExternalSorter during spilling
After calling spill() on SortedIterator, the array inside InMemorySorter is not needed, it should be freed during spilling, this could help to join multiple tables with limited memory.
Author: Davies Liu <[email protected]>
Closes #9793 from davies/free_array.
(cherry picked from commit 58d9b26)
Signed-off-by: Josh Rosen <[email protected]>1 parent 3f40af5 commit 0155693
File tree
2 files changed
+19
-22
lines changed- core/src/main/java/org/apache/spark/util/collection/unsafe/sort
2 files changed
+19
-22
lines changedLines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
471 | 477 | | |
472 | 478 | | |
473 | 479 | | |
| |||
489 | 495 | | |
490 | 496 | | |
491 | 497 | | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | 498 | | |
497 | 499 | | |
498 | 500 | | |
| |||
Lines changed: 13 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
163 | | - | |
| 164 | + | |
164 | 165 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 166 | + | |
| 167 | + | |
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
181 | 176 | | |
182 | 177 | | |
183 | 178 | | |
184 | | - | |
| 179 | + | |
185 | 180 | | |
186 | 181 | | |
187 | 182 | | |
| |||
192 | 187 | | |
193 | 188 | | |
194 | 189 | | |
195 | | - | |
| 190 | + | |
196 | 191 | | |
197 | 192 | | |
198 | 193 | | |
199 | | - | |
| 194 | + | |
200 | 195 | | |
201 | 196 | | |
202 | 197 | | |
203 | 198 | | |
204 | 199 | | |
205 | | - | |
| 200 | + | |
206 | 201 | | |
207 | 202 | | |
208 | 203 | | |
209 | | - | |
| 204 | + | |
210 | 205 | | |
211 | 206 | | |
212 | 207 | | |
| |||
229 | 224 | | |
230 | 225 | | |
231 | 226 | | |
232 | | - | |
| 227 | + | |
233 | 228 | | |
234 | 229 | | |
0 commit comments