jihoonson commented on a change in pull request #8823: Add InputSource and
InputFormat interfaces
URL: https://github.com/apache/incubator-druid/pull/8823#discussion_r344422402
##########
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:
Fixed.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]