kfaraz commented on code in PR #15168:
URL: https://github.com/apache/druid/pull/15168#discussion_r1361082679
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:
##########
@@ -1467,6 +1480,34 @@ private void publishAllSegments(final Set<DataSegment>
segments) throws IOExcept
task.emitMetric(context.emitter(), "ingest/segments/count",
segmentsWithTombstones.size());
}
+ private static TaskAction<SegmentPublishResult> createAppendAction(
+ Set<DataSegment> segments,
+ TaskLockType taskLockType
+ )
+ {
+ if (taskLockType.equals(TaskLockType.APPEND)) {
+ return SegmentTransactionalAppendAction.forSegments(segments);
+ } else if (taskLockType.equals(TaskLockType.SHARED)) {
+ return SegmentTransactionalInsertAction.appendAction(segments, null,
null);
+ } else {
+ throw DruidException.defensive("Invalid lock type %s received for append
action", taskLockType);
Review Comment:
Don't think we really need these exceptions (esp since the methods are
private) here as we would reach these methods only after the validation is
already done.
--
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]