adarshsanjeev commented on code in PR #15000:
URL: https://github.com/apache/druid/pull/15000#discussion_r1328650309
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/SegmentLoadStatusFetcher.java:
##########
@@ -90,11 +94,15 @@ public class SegmentLoadWaiter
private final Set<String> versionsToAwait;
private final int totalSegmentsGenerated;
private final boolean doWait;
+ // since live reports fetch the value in another thread, we need to use
AtomicReference
private final AtomicReference<SegmentLoadWaiterStatus> status;
Review Comment:
If we are renaming the class, the status class might need to be renamed too
##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/SegmentLoadWaiterTest.java:
##########
@@ -78,18 +95,81 @@ public void testMultipleVersionWaitsForLoadCorrectly()
throws Exception
doAnswer(new Answer<String>()
{
int timesInvoked = 0;
+
@Override
public String answer(InvocationOnMock invocation) throws Throwable
{
timesInvoked += 1;
- SegmentLoadWaiter.VersionLoadStatus loadStatus = new
SegmentLoadWaiter.VersionLoadStatus(5, timesInvoked, 0, 5 - timesInvoked, 0);
+ SegmentLoadStatusFetcher.VersionLoadStatus loadStatus = new
SegmentLoadStatusFetcher.VersionLoadStatus(
+ 5,
+ timesInvoked,
+ 0,
+ 5
+ - timesInvoked,
Review Comment:
new line not needed
##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/SegmentLoadWaiterTest.java:
##########
@@ -55,15 +56,31 @@ public void testSingleVersionWaitsForLoadCorrectly() throws
Exception
doAnswer(new Answer<String>()
{
int timesInvoked = 0;
+
@Override
public String answer(InvocationOnMock invocation) throws Throwable
{
timesInvoked += 1;
- SegmentLoadWaiter.VersionLoadStatus loadStatus = new
SegmentLoadWaiter.VersionLoadStatus(5, timesInvoked, 0, 5 - timesInvoked, 0);
+ SegmentLoadStatusFetcher.VersionLoadStatus loadStatus = new
SegmentLoadStatusFetcher.VersionLoadStatus(
+ 5,
+ timesInvoked,
+ 0,
+ 5
+ - timesInvoked,
Review Comment:
New line not needed
##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/SegmentLoadWaiterTest.java:
##########
@@ -39,7 +40,7 @@ public class SegmentLoadWaiterTest
{
Review Comment:
Class should be renamed
--
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]