akshat-lakhera opened a new pull request, #20788:
URL: https://github.com/apache/druid/pull/20788
Part of #20525.
### Description
This is the first slice of the "DataSegment constructors and no-argument
builder()" group from the table in #20525. The 9 and 10 argument DataSegment
constructors are deprecated in favour of DataSegment.builder(SegmentId), so I
moved the callers in the deep storage extension tests over to the builder. The
group has about 420 call sites across 150 files, so I'm splitting it by module
to keep each PR easy to review, and this one only covers the test code of the
S3, HDFS, Aliyun OSS, Azure, Google and CloudFiles extensions, 11 files and 23
calls.
Behaviour stays the same. Each call is now
DataSegment.builder(SegmentId.of(dataSource, interval, version, partition))
followed by loadSpec, dimensions, metrics, shardSpec, binaryVersion and size,
and every chain sets shardSpec, binaryVersion and size explicitly, since the
builder's own defaults for those differ from what the old calls passed.
Arguments that were null in the old call are left out, because the builder
leaves them null too. No production code changes.
The rest of the group (other extensions, processing, sql, benchmarks,
multi-stage-query, indexing-service and server) will follow in separate PRs.
#### Testing
Checkstyle and forbiddenapis pass for the touched modules. The unit tests of
the changed classes pass for S3, Aliyun OSS, CloudFiles, Google and Azure,
apart from the push tests that build a v10 segment and
AzureDataSegmentKillerTest, which fail on my Windows machine because of locked
memory mapped temp files and a colon in a path, the same with or without this
change. The HDFS tests need Hadoop native libraries that I don't have on
Windows, so I'm relying on CI for those.
<hr>
##### Key changed/added classes in this PR
* S3DataSegmentKillerTest, S3DataSegmentMoverTest, S3DataSegmentPusherTest
* HdfsDataSegmentKillerTest, HdfsDataSegmentPusherTest
* OssDataSegmentMoverTest, OssDataSegmentPusherTest
* AzureDataSegmentPusherTest
* GoogleDataSegmentKillerTest, GoogleDataSegmentPusherTest
* CloudFilesDataSegmentPusherTest
<hr>
This PR has:
- [x] been self-reviewed.
- [x] a behaviour-preserving refactor covered by the existing unit tests of
the changed classes.
PTAL @FrankChen021
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]