Adapt shuffle and spill callers to Java helpers#15050
Conversation
0850c48 to
df44354
Compare
e0350c2 to
afac240
Compare
8eeb39d to
8717459
Compare
2b813f5 to
ef56038
Compare
1ffdf02 to
9fb1bad
Compare
ef56038 to
05bae3b
Compare
9fb1bad to
78de8f8
Compare
05bae3b to
3cfcc3a
Compare
78de8f8 to
d617692
Compare
3cfcc3a to
2db1b2a
Compare
d617692 to
f5e488f
Compare
733c9d0 to
4150e69
Compare
f5e488f to
a206a28
Compare
4150e69 to
ea52688
Compare
a206a28 to
eb2e327
Compare
ea52688 to
762a24f
Compare
Signed-off-by: Gera Shegalov <gshegalov@nvidia.com>
8cd5d42 to
df09b9c
Compare
6f6f3d3 to
ad5eccd
Compare
Greptile SummaryThis PR migrates shuffle and spill callers from Scala case classes and Spark's internal
Confidence Score: 4/5Safe to merge; all changes are mechanical caller-side adaptations with no behavioral intent, backed by a full tree-equivalence build check. The entire PR is a structural migration: case class → class, Spark Logging → SLF4J, and ByteBuffer covariant-return casts. The pattern-match rewrites (extractor patterns to typed patterns) are semantically identical. The only finding is two logWarning helpers that miss the isWarnEnabled guard present elsewhere in the same PR, causing by-name msg lambdas to be evaluated even when warn logging is off — a minor consistency gap, not a correctness issue. SpillFramework.scala and SpillablePartialFileHandle.scala have the logging guard inconsistency noted above; all other files look clean. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph Before["Before (Scala case classes + Spark Logging)"]
A1["case class PendingTransferRequest\n(auto equals/hashCode/unapply)"]
A2["case class BlockRange\n(in WindowedBlockIterator.scala)"]
A3["case class CompressedTable\n(in TableCompressionCodec.scala)"]
A4["extends Logging\n(org.apache.spark.internal.Logging)"]
A5["ByteBuffer.flip()\nReturns Buffer (Java 8)\nReturns ByteBuffer (Java 9+)"]
end
subgraph After["After (Java-friendly helpers + SLF4J)"]
B1["class PendingTransferRequest\nextends Serializable\n(val fields, new keyword)"]
B2["class BlockRange\n(moved to Java helper, same package)"]
B3["class CompressedTable\n(moved to Java helper)"]
B4["private val log = SLF4J\nprivate def logX(msg: => String)"]
B5["buffer.asInstanceOf[Buffer].flip()\nExplicit cast for covariant return"]
end
A1 -->|"case class → class"| B1
A2 -->|"moved to Java"| B2
A3 -->|"moved to Java"| B3
A4 -->|"replaced with"| B4
A5 -->|"fixed for Java 9+"| B5
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
subgraph Before["Before (Scala case classes + Spark Logging)"]
A1["case class PendingTransferRequest\n(auto equals/hashCode/unapply)"]
A2["case class BlockRange\n(in WindowedBlockIterator.scala)"]
A3["case class CompressedTable\n(in TableCompressionCodec.scala)"]
A4["extends Logging\n(org.apache.spark.internal.Logging)"]
A5["ByteBuffer.flip()\nReturns Buffer (Java 8)\nReturns ByteBuffer (Java 9+)"]
end
subgraph After["After (Java-friendly helpers + SLF4J)"]
B1["class PendingTransferRequest\nextends Serializable\n(val fields, new keyword)"]
B2["class BlockRange\n(moved to Java helper, same package)"]
B3["class CompressedTable\n(moved to Java helper)"]
B4["private val log = SLF4J\nprivate def logX(msg: => String)"]
B5["buffer.asInstanceOf[Buffer].flip()\nExplicit cast for covariant return"]
end
A1 -->|"case class → class"| B1
A2 -->|"moved to Java"| B2
A3 -->|"moved to Java"| B3
A4 -->|"replaced with"| B4
A5 -->|"fixed for Java 9+"| B5
Reviews (1): Last reviewed commit: "Fix shuffle test helper construction" | Re-trigger Greptile |
Related to #14834.
Description
This PR is one reviewable layer in the unshim stack introduced by #15025. It updates shuffle and spill callers to use the moved Java-friendly helper modules. This isolates the shuffle/spill call-site migration from unrelated execution changes.
Stack context
Testing and validation notes
Checklists
Documentation
Testing
(Covered by the validation notes in the PR description.)
Performance