ccaominh commented on a change in pull request #8823: Add InputSource and InputFormat interfaces URL: https://github.com/apache/incubator-druid/pull/8823#discussion_r343948966
########## File path: indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java ########## @@ -1043,30 +1082,90 @@ public IndexTuningConfig getTuningConfig() } @JsonTypeName("index") - public static class IndexIOConfig implements IOConfig + public static class IndexIOConfig implements BatchIOConfig { private static final boolean DEFAULT_APPEND_TO_EXISTING = false; private final FirehoseFactory firehoseFactory; + private final InputSource inputSource; + private final InputFormat inputFormat; private final boolean appendToExisting; @JsonCreator public IndexIOConfig( - @JsonProperty("firehose") FirehoseFactory firehoseFactory, + @Deprecated @JsonProperty("firehose") @Nullable FirehoseFactory firehoseFactory, + @JsonProperty("inputSource") @Nullable InputSource inputSource, + @JsonProperty("inputFormat") @Nullable InputFormat inputFormat, @JsonProperty("appendToExisting") @Nullable Boolean appendToExisting ) { + Checks.checkOneNotNullOrEmpty( + ImmutableList.of(new Property<>("firehose", firehoseFactory), new Property<>("inputSource", inputSource)) + ); + if (firehoseFactory != null && inputFormat != null) { + throw new IAE("Cannot use firehose and inputFormat together. Try use inputSource instead of firehose."); Review comment: Typo: Try use inputFormat -> Try using inputSource ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org