You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "kfaraz (via GitHub)" <gi...@apache.org> on 2024/04/02 05:10:24 UTC
[PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
kfaraz opened a new pull request, #16226:
URL: https://github.com/apache/druid/pull/16226
### Changes
- Update `OverlordClient.getReportAsMap()` to return `TaskReport.ReportMap`
- Move the following classes to `org.apache.druid.indexer.report` in the `druid-processing` module
### Pending
- Add tests
<hr>
This PR has:
- [ ] been self-reviewed.
- [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid cluster.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz merged PR #16226:
URL: https://github.com/apache/druid/pull/16226
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "abhishekrb19 (via GitHub)" <gi...@apache.org>.
abhishekrb19 commented on code in PR #16226:
URL: https://github.com/apache/druid/pull/16226#discussion_r1558249158
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -1683,21 +1684,29 @@ private RowIngestionMetersTotals getRowStatsAndUnparseableEventsForRunningTasks(
final SimpleRowIngestionMeters buildSegmentsRowStats = new SimpleRowIngestionMeters();
for (String runningTaskId : runningTaskIds) {
try {
- final Map<String, Object> report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
+ final TaskReport.ReportMap report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
if (report == null || report.isEmpty()) {
// task does not have a running report yet
continue;
}
- Map<String, Object> ingestionStatsAndErrors = (Map<String, Object>) report.get("ingestionStatsAndErrors");
- Map<String, Object> payload = (Map<String, Object>) ingestionStatsAndErrors.get("payload");
- Map<String, Object> rowStats = (Map<String, Object>) payload.get("rowStats");
+ final Optional<IngestionStatsAndErrorsTaskReport> ingestionStatsReport
+ = report.findReport(IngestionStatsAndErrorsTaskReport.REPORT_KEY);
+
+ final IngestionStatsAndErrors payload;
+ if (ingestionStatsReport.isPresent()) {
Review Comment:
CI checks are failing because of missing branch and line coverage for this code.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #16226:
URL: https://github.com/apache/druid/pull/16226#discussion_r1558891350
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -1683,21 +1684,29 @@
final SimpleRowIngestionMeters buildSegmentsRowStats = new SimpleRowIngestionMeters();
for (String runningTaskId : runningTaskIds) {
try {
- final Map<String, Object> report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
+ final TaskReport.ReportMap report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
if (report == null || report.isEmpty()) {
// task does not have a running report yet
continue;
}
- Map<String, Object> ingestionStatsAndErrors = (Map<String, Object>) report.get("ingestionStatsAndErrors");
- Map<String, Object> payload = (Map<String, Object>) ingestionStatsAndErrors.get("payload");
- Map<String, Object> rowStats = (Map<String, Object>) payload.get("rowStats");
+ final Optional<IngestionStatsAndErrorsTaskReport> ingestionStatsReport
+ = report.findReport(IngestionStatsAndErrorsTaskReport.REPORT_KEY);
+
+ final IngestionStatsAndErrors payload;
+ if (ingestionStatsReport.isPresent()) {
+ payload = ingestionStatsReport.get().getPayload();
+ } else {
+ payload = null;
+ }
+
+ Map<String, Object> rowStats = payload.getRowStats();
Review Comment:
Reverted this change as it was not really needed.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #16226:
URL: https://github.com/apache/druid/pull/16226#discussion_r1548916228
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -1683,21 +1684,29 @@
final SimpleRowIngestionMeters buildSegmentsRowStats = new SimpleRowIngestionMeters();
for (String runningTaskId : runningTaskIds) {
try {
- final Map<String, Object> report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
+ final TaskReport.ReportMap report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
if (report == null || report.isEmpty()) {
// task does not have a running report yet
continue;
}
- Map<String, Object> ingestionStatsAndErrors = (Map<String, Object>) report.get("ingestionStatsAndErrors");
- Map<String, Object> payload = (Map<String, Object>) ingestionStatsAndErrors.get("payload");
- Map<String, Object> rowStats = (Map<String, Object>) payload.get("rowStats");
+ final Optional<IngestionStatsAndErrorsTaskReport> ingestionStatsReport
+ = report.findReport(IngestionStatsAndErrorsTaskReport.REPORT_KEY);
+
+ final IngestionStatsAndErrors payload;
+ if (ingestionStatsReport.isPresent()) {
+ payload = ingestionStatsReport.get().getPayload();
+ } else {
+ payload = null;
+ }
+
+ Map<String, Object> rowStats = payload.getRowStats();
Review Comment:
## Dereferenced variable may be null
Variable [payload](1) may be null at this access because of [this](2) assignment.
[Show more details](https://github.com/apache/druid/security/code-scanning/7205)
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on PR #16226:
URL: https://github.com/apache/druid/pull/16226#issuecomment-2054443239
Thanks a lot for the review, @abhishekrb19 !
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #16226:
URL: https://github.com/apache/druid/pull/16226#discussion_r1563931733
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/util/SqlStatementResourceHelper.java:
##########
@@ -361,22 +364,42 @@ public static MSQStagesReport.Stage getFinalStage(MSQTaskReportPayload msqTaskRe
return null;
}
- public static Map<String, Object> getQueryExceptionDetails(Map<String, Object> payload)
+ @Nullable
+ private static MSQErrorReport getQueryExceptionDetails(MSQTaskReportPayload payload)
{
- return getMap(getMap(payload, "status"), "errorReport");
+ return payload == null ? null : payload.getStatus().getErrorReport();
}
- public static Map<String, Object> getMap(Map<String, Object> map, String key)
+ @Nullable
+ public static MSQTaskReportPayload getPayload(TaskReport.ReportMap reportMap)
{
- if (map == null) {
+ if (reportMap == null) {
return null;
}
- return (Map<String, Object>) map.get(key);
+
+ com.google.common.base.Optional<MSQTaskReport> report = reportMap.findReport("multiStageQuery");
Review Comment:
Fixed.
##########
server/src/test/java/org/apache/druid/client/indexing/NoopOverlordClient.java:
##########
@@ -84,7 +85,7 @@ public ListenableFuture<TaskPayloadResponse> taskPayload(String taskId)
}
@Override
- public ListenableFuture<Map<String, Object>> taskReportAsMap(String taskId)
+ public ListenableFuture<TaskReport.ReportMap> taskReportAsMap(String taskId)
Review Comment:
Added.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "abhishekrb19 (via GitHub)" <gi...@apache.org>.
abhishekrb19 commented on code in PR #16226:
URL: https://github.com/apache/druid/pull/16226#discussion_r1560198230
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/util/SqlStatementResourceHelper.java:
##########
@@ -361,22 +364,42 @@ public static MSQStagesReport.Stage getFinalStage(MSQTaskReportPayload msqTaskRe
return null;
}
- public static Map<String, Object> getQueryExceptionDetails(Map<String, Object> payload)
+ @Nullable
+ private static MSQErrorReport getQueryExceptionDetails(MSQTaskReportPayload payload)
{
- return getMap(getMap(payload, "status"), "errorReport");
+ return payload == null ? null : payload.getStatus().getErrorReport();
}
- public static Map<String, Object> getMap(Map<String, Object> map, String key)
+ @Nullable
+ public static MSQTaskReportPayload getPayload(TaskReport.ReportMap reportMap)
{
- if (map == null) {
+ if (reportMap == null) {
return null;
}
- return (Map<String, Object>) map.get(key);
+
+ com.google.common.base.Optional<MSQTaskReport> report = reportMap.findReport("multiStageQuery");
Review Comment:
Just an observation: it's slightly weird that we have `Optional` usages from both `guava` and `java.util` packages in the same class.
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/sql/resources/SqlStatementResource.java:
##########
@@ -735,8 +735,8 @@ private Optional<Yielder<Object[]>> getResultYielder(
);
}
- MSQTaskReportPayload msqTaskReportPayload = jsonMapper.convertValue(SqlStatementResourceHelper.getPayload(
- contactOverlord(overlordClient.taskReportAsMap(queryId), queryId)), MSQTaskReportPayload.class);
+ MSQTaskReportPayload msqTaskReportPayload = SqlStatementResourceHelper.getPayload(
+ contactOverlord(overlordClient.taskReportAsMap(queryId), queryId));
Review Comment:
nit: for readability
```suggestion
MSQTaskReportPayload msqTaskReportPayload = SqlStatementResourceHelper.getPayload(
contactOverlord(overlordClient.taskReportAsMap(queryId), queryId)
);
```
##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/SinglePhaseParallelIndexingTest.java:
##########
@@ -335,6 +338,38 @@ public void testRunInParallel()
testRunAndOverwrite(Intervals.of("2017-12/P1M"), Granularities.DAY);
}
+ @Test
+ public void testGetRunningTaskReports() throws Exception
+ {
+ final ParallelIndexSupervisorTask task = newTask(
+ Intervals.of("2017-12/P1M"),
+ Granularities.DAY,
+ false,
+ true
+ );
+ task.addToContext(Tasks.FORCE_TIME_CHUNK_LOCK_KEY, lockGranularity == LockGranularity.TIME_CHUNK);
+ task.addToContext(DISABLE_TASK_INJECT_CONTEXT_KEY, true);
+
+ // Keep tasks running until finish is triggered
+ getIndexingServiceClient().keepTasksRunning();
+ getIndexingServiceClient().runTask(task.getId(), task);
+
+ // Allow enough time for sub-tasks to be in running state
+ Thread.sleep(2000);
Review Comment:
I suppose adding a latch or a similar mechanism for testing would make it more involved?
##########
server/src/test/java/org/apache/druid/client/indexing/NoopOverlordClient.java:
##########
@@ -84,7 +85,7 @@ public ListenableFuture<TaskPayloadResponse> taskPayload(String taskId)
}
@Override
- public ListenableFuture<Map<String, Object>> taskReportAsMap(String taskId)
+ public ListenableFuture<TaskReport.ReportMap> taskReportAsMap(String taskId)
Review Comment:
I'd suggest adding a simple serde test that verifies that the old and new objects being returned roundtrip fine for compatibility reasons (similar to this comment https://github.com/apache/druid/pull/16217#discussion_r1545912070).
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/sql/resources/SqlStatementResource.java:
##########
@@ -746,8 +746,8 @@ private Optional<Yielder<Object[]>> getResultYielder(
} else if (msqControllerTask.getQuerySpec().getDestination() instanceof DurableStorageMSQDestination) {
- MSQTaskReportPayload msqTaskReportPayload = jsonMapper.convertValue(SqlStatementResourceHelper.getPayload(
- contactOverlord(overlordClient.taskReportAsMap(queryId), queryId)), MSQTaskReportPayload.class);
+ MSQTaskReportPayload msqTaskReportPayload = SqlStatementResourceHelper.getPayload(
+ contactOverlord(overlordClient.taskReportAsMap(queryId), queryId));
Review Comment:
```suggestion
MSQTaskReportPayload msqTaskReportPayload = SqlStatementResourceHelper.getPayload(
contactOverlord(overlordClient.taskReportAsMap(queryId), queryId)
);
```
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "abhishekrb19 (via GitHub)" <gi...@apache.org>.
abhishekrb19 commented on code in PR #16226:
URL: https://github.com/apache/druid/pull/16226#discussion_r1558249158
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -1683,21 +1684,29 @@ private RowIngestionMetersTotals getRowStatsAndUnparseableEventsForRunningTasks(
final SimpleRowIngestionMeters buildSegmentsRowStats = new SimpleRowIngestionMeters();
for (String runningTaskId : runningTaskIds) {
try {
- final Map<String, Object> report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
+ final TaskReport.ReportMap report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
if (report == null || report.isEmpty()) {
// task does not have a running report yet
continue;
}
- Map<String, Object> ingestionStatsAndErrors = (Map<String, Object>) report.get("ingestionStatsAndErrors");
- Map<String, Object> payload = (Map<String, Object>) ingestionStatsAndErrors.get("payload");
- Map<String, Object> rowStats = (Map<String, Object>) payload.get("rowStats");
+ final Optional<IngestionStatsAndErrorsTaskReport> ingestionStatsReport
+ = report.findReport(IngestionStatsAndErrorsTaskReport.REPORT_KEY);
+
+ final IngestionStatsAndErrors payload;
+ if (ingestionStatsReport.isPresent()) {
Review Comment:
CI checks are failing because of insufficient branch and line coverage for this code.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "abhishekrb19 (via GitHub)" <gi...@apache.org>.
abhishekrb19 commented on PR #16226:
URL: https://github.com/apache/druid/pull/16226#issuecomment-2046008057
The changes look good to me overall! Just needs CI checks to pass and conflicts resolved. Also, did you intend to add more tests in this patch as noted "pending" in the PR description?
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "abhishekrb19 (via GitHub)" <gi...@apache.org>.
abhishekrb19 commented on code in PR #16226:
URL: https://github.com/apache/druid/pull/16226#discussion_r1558246764
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -1683,21 +1684,29 @@
final SimpleRowIngestionMeters buildSegmentsRowStats = new SimpleRowIngestionMeters();
for (String runningTaskId : runningTaskIds) {
try {
- final Map<String, Object> report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
+ final TaskReport.ReportMap report = getTaskReport(toolbox.getOverlordClient(), runningTaskId);
if (report == null || report.isEmpty()) {
// task does not have a running report yet
continue;
}
- Map<String, Object> ingestionStatsAndErrors = (Map<String, Object>) report.get("ingestionStatsAndErrors");
- Map<String, Object> payload = (Map<String, Object>) ingestionStatsAndErrors.get("payload");
- Map<String, Object> rowStats = (Map<String, Object>) payload.get("rowStats");
+ final Optional<IngestionStatsAndErrorsTaskReport> ingestionStatsReport
+ = report.findReport(IngestionStatsAndErrorsTaskReport.REPORT_KEY);
+
+ final IngestionStatsAndErrors payload;
+ if (ingestionStatsReport.isPresent()) {
+ payload = ingestionStatsReport.get().getPayload();
+ } else {
+ payload = null;
+ }
+
+ Map<String, Object> rowStats = payload.getRowStats();
Review Comment:
The CodeQL warning looks legitimate. `payload` can be null with line 1701, so accessing `payload.getRowStats()` will cause a NPE
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on PR #16226:
URL: https://github.com/apache/druid/pull/16226#issuecomment-2047321769
> The changes look good to me overall! Just needs CI checks to pass and conflicts resolved. Also, did you intend to add more tests in this patch as noted "pending" in the PR description?
Added tests to verify report of running tasks.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Fix OverlordClient to read reports as a concrete `ReportMap` object instead of a generic map (druid)
Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #16226:
URL: https://github.com/apache/druid/pull/16226#discussion_r1563932449
##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/SinglePhaseParallelIndexingTest.java:
##########
@@ -335,6 +338,38 @@ public void testRunInParallel()
testRunAndOverwrite(Intervals.of("2017-12/P1M"), Granularities.DAY);
}
+ @Test
+ public void testGetRunningTaskReports() throws Exception
+ {
+ final ParallelIndexSupervisorTask task = newTask(
+ Intervals.of("2017-12/P1M"),
+ Granularities.DAY,
+ false,
+ true
+ );
+ task.addToContext(Tasks.FORCE_TIME_CHUNK_LOCK_KEY, lockGranularity == LockGranularity.TIME_CHUNK);
+ task.addToContext(DISABLE_TASK_INJECT_CONTEXT_KEY, true);
+
+ // Keep tasks running until finish is triggered
+ getIndexingServiceClient().keepTasksRunning();
+ getIndexingServiceClient().runTask(task.getId(), task);
+
+ // Allow enough time for sub-tasks to be in running state
+ Thread.sleep(2000);
Review Comment:
Yes, it felt like overkill right now. I plan to revisit these indexing tests at some point in the near future.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org