github-advanced-security[bot] commented on code in PR #19526:
URL: https://github.com/apache/druid/pull/19526#discussion_r3314872300
##########
server/src/test/java/org/apache/druid/server/http/DataSourcesResourceTest.java:
##########
@@ -1757,6 +1904,52 @@
EasyMock.verify(segmentsMetadataManager, inventoryView);
}
+ @Test
+ public void
testGetDatasourceLoadstatusDefaultUsesStrictTierAwareSegmentLoadWhenRequested()
+ {
+ final DateTime now = DateTimes.nowUtc();
+ final DataSegment loadedOnAllTiers = new DataSegment(
+ TestDataSource.WIKI,
+ new Interval(now.minusDays(5), Period.days(1)),
+ "",
+ null,
+ null,
+ null,
+ null,
+ 0x9,
+ 10
+ );
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [DataSegment.DataSegment](1) should be avoided because it has been
deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/11257)
##########
server/src/test/java/org/apache/druid/server/http/DataSourcesResourceTest.java:
##########
@@ -1757,6 +1904,52 @@
EasyMock.verify(segmentsMetadataManager, inventoryView);
}
+ @Test
+ public void
testGetDatasourceLoadstatusDefaultUsesStrictTierAwareSegmentLoadWhenRequested()
+ {
+ final DateTime now = DateTimes.nowUtc();
+ final DataSegment loadedOnAllTiers = new DataSegment(
+ TestDataSource.WIKI,
+ new Interval(now.minusDays(5), Period.days(1)),
+ "",
+ null,
+ null,
+ null,
+ null,
+ 0x9,
+ 10
+ );
+ final DataSegment missingTier = new DataSegment(
+ TestDataSource.WIKI,
+ new Interval(now.minusDays(4), Period.days(1)),
+ "",
+ null,
+ null,
+ null,
+ null,
+ 0x9,
+ 20
+ );
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [DataSegment.DataSegment](1) should be avoided because it has been
deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/11258)
##########
server/src/test/java/org/apache/druid/server/coordinator/DruidCoordinatorTest.java:
##########
@@ -366,6 +366,68 @@
EasyMock.verify(metadataRuleManager);
}
+ @Test(timeout = 60_000L)
+ public void testLoadStatusCanUseStrictTierAwareSegmentLoad() throws Exception
+ {
+ final String dataSource = "dataSource", hotTierName = "hot", coldTierName
= "cold";
+ final DataSegment dataSegment = new DataSegment(
+ dataSource,
+ Intervals.of("2018-01-02/P1D"),
+ "v1",
+ null,
+ null,
+ null,
+ null,
+ 0x9,
+ 0
+ );
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [DataSegment.DataSegment](1) should be avoided because it has been
deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/11256)
--
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]