Skip to content

Navigation Menu

Sign in
Sign up

[AURON #2307] Add @transient to large fields and use NativePartition to reduce serialization overhead - #2515

Open
Deegue wants to merge 1 commit into
apache:master from
Deegue:auron#2307_perf-add-transient-reduce-serialization
Open

[AURON #2307] Add @transient to large fields and use NativePartition to reduce serialization overhead #2515
Deegue wants to merge 1 commit into
apache:master from
Deegue:auron#2307_perf-add-transient-reduce-serialization

Conversation

@Deegue

@Deegue Deegue commented Sep 8, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #2307

Rationale for this change

Reduce task serialization size and memory usage by avoiding serialization of the full rddPartitions array per task.

Previously, each task closure captured a reference to the upstream NativeRDD, causing the entire rddPartitions array to be serialized with every task. This PR introduces a NativePartition[P] wrapper that embeds only the relevant partition payload into each task's closure, and marks rddPartitions as @transient so the full array is excluded from serialization.

What changes are included in this PR?

  • Add @transient to rddPartitions in NativeRDD, with numRddPartitions stored for lightweight partition reconstruction after deserialization
  • Add NativePartition[P] case class to carry original partition payloads through NativeRDD without re-indexing into the partitions array
  • Add NativePartition.unwrap() helper for safe partition extraction (handles reuse-exchange scenarios where the partition may not be a NativePartition)
  • Wrap input partitions in NativePartition before NativeRDD creation across all NativeExec operators
  • Store original NativePartition array in AuronShuffleDependency.rddPartitions for Spark 4.x ShuffleWriteProcessor compatibility
  • Add @transient to inputFileScanRDD in NativeFileSourceScanBase (large driver-only field)
  • Add @transient to private constructor parameters in Exec classes where the field is only used on the driver (NativeBroadcastExchangeBase.mode, NativeParquetInsertIntoHiveTableBase.cmd, NativeHiveTableScanBase.basedHiveScan)

Are there any user-facing changes?

No.

How was this patch tested?

UTs.

Deegue force-pushed the auron#2307_perf-add-transient-reduce-serialization branch 9 times, most recently from a7567a4 to bd42e37 Compare September 9, 2026 14:29
Deegue force-pushed the auron#2307_perf-add-transient-reduce-serialization branch from bd42e37 to 7ecfbea Compare September 10, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add @transient to large fields and use NativePartition to reduce serialization overhead

1 participant

AltStyle によって変換されたページ (->オリジナル) /