use of org.apache.druid.data.input.impl.TimedShutoffInputSourceReader in project druid by druid-io.
the class InputSourceSampler method buildReader.
private InputSourceReader buildReader(SamplerConfig samplerConfig, DataSchema dataSchema, InputSource inputSource, @Nullable InputFormat inputFormat, File tempDir) {
final InputRowSchema inputRowSchema = InputRowSchemas.fromDataSchema(dataSchema);
InputSourceReader reader = inputSource.reader(inputRowSchema, inputFormat, tempDir);
if (samplerConfig.getTimeoutMs() > 0) {
reader = new TimedShutoffInputSourceReader(reader, DateTimes.nowUtc().plusMillis(samplerConfig.getTimeoutMs()));
}
return dataSchema.getTransformSpec().decorate(reader);
}
Aggregations