attiasr commented on code in PR #3874:
URL: https://github.com/apache/celeborn/pull/3874#discussion_r4302546582
##########
common/src/main/scala/org/apache/celeborn/common/util/PbSerDeUtils.scala:
##########
@@ -161,9 +161,14 @@ object PbSerDeUtils {
builder.setBufferSize(mapFileMeta.getBufferSize)
builder.setNumSubpartitions(mapFileMeta.getNumSubpartitions)
builder.setIsSegmentGranularityVisible(mapFileMeta.isSegmentGranularityVisible)
-
builder.putAllPartitionWritingSegment(mapFileMeta.getSubPartitionWritingSegmentId)
- builder.addAllSegmentIndex(
-
mapFileMeta.getSubPartitionSegmentIndexes.asScala.map(toPbSegmentIndex).asJava)
+ // Both are created lazily on the first segment: null without segment
granularity.
+ if (mapFileMeta.getSubPartitionWritingSegmentId != null) {
+
builder.putAllPartitionWritingSegment(mapFileMeta.getSubPartitionWritingSegmentId)
+ }
Review Comment:
Good point, thanks. Rather than documenting the difference, I made
`fromPbFileInfo` restore empty segment fields as `null` (4c2784e9d), so
`hasPartitionSegmentIds()` on a restored non-segment MAP meta matches a live
one. The round-trip tests now assert it in both directions: `false` without
segment granularity, `true` with it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]