mirror of https://github.com/apache/druid.git
clarify error messaging for parallel indexing task when when missing numShards or intervals (#8513)
This commit is contained in:
parent
1498250204
commit
b00dd84fa2
|
@ -183,13 +183,14 @@ public class ParallelIndexSupervisorTask extends AbstractBatchIndexTask implemen
|
||||||
throw new IAE("[%s] should implement FiniteFirehoseFactory", firehoseFactory.getClass().getSimpleName());
|
throw new IAE("[%s] should implement FiniteFirehoseFactory", firehoseFactory.getClass().getSimpleName());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ingestionSchema.getTuningConfig().isForceGuaranteedRollup()
|
if (ingestionSchema.getTuningConfig().isForceGuaranteedRollup()) {
|
||||||
&& (ingestionSchema.getTuningConfig().getNumShards() == null
|
if (ingestionSchema.getTuningConfig().getNumShards() == null) {
|
||||||
|| ingestionSchema.getDataSchema().getGranularitySpec().inputIntervals().isEmpty())) {
|
throw new ISE("forceGuaranteedRollup is set but numShards is missing in partitionsSpec");
|
||||||
throw new ISE(
|
}
|
||||||
"forceGuaranteedRollup is set "
|
|
||||||
+ "but numShards is missing in partitionsSpec or intervals is missing in granularitySpec"
|
if (ingestionSchema.getDataSchema().getGranularitySpec().inputIntervals().isEmpty()) {
|
||||||
);
|
throw new ISE("forceGuaranteedRollup is set but intervals is missing in granularitySpec");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.baseFirehoseFactory = (FiniteFirehoseFactory) firehoseFactory;
|
this.baseFirehoseFactory = (FiniteFirehoseFactory) firehoseFactory;
|
||||||
|
|
|
@ -159,8 +159,7 @@ public class MultiPhaseParallelIndexingTest extends AbstractParallelIndexSupervi
|
||||||
{
|
{
|
||||||
expectedException.expect(IllegalStateException.class);
|
expectedException.expect(IllegalStateException.class);
|
||||||
expectedException.expectMessage(
|
expectedException.expectMessage(
|
||||||
"forceGuaranteedRollup is set but numShards is missing in partitionsSpec "
|
"forceGuaranteedRollup is set but intervals is missing in granularitySpec"
|
||||||
+ "or intervals is missing in granularitySpec"
|
|
||||||
);
|
);
|
||||||
newTask(
|
newTask(
|
||||||
null,
|
null,
|
||||||
|
@ -177,8 +176,7 @@ public class MultiPhaseParallelIndexingTest extends AbstractParallelIndexSupervi
|
||||||
{
|
{
|
||||||
expectedException.expect(IllegalStateException.class);
|
expectedException.expect(IllegalStateException.class);
|
||||||
expectedException.expectMessage(
|
expectedException.expectMessage(
|
||||||
"forceGuaranteedRollup is set but numShards is missing in partitionsSpec "
|
"forceGuaranteedRollup is set but numShards is missing in partitionsSpec"
|
||||||
+ "or intervals is missing in granularitySpec"
|
|
||||||
);
|
);
|
||||||
newTask(
|
newTask(
|
||||||
Intervals.of("2017/2018"),
|
Intervals.of("2017/2018"),
|
||||||
|
|
Loading…
Reference in New Issue