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());
|
||||
}
|
||||
|
||||
if (ingestionSchema.getTuningConfig().isForceGuaranteedRollup()
|
||||
&& (ingestionSchema.getTuningConfig().getNumShards() == null
|
||||
|| ingestionSchema.getDataSchema().getGranularitySpec().inputIntervals().isEmpty())) {
|
||||
throw new ISE(
|
||||
"forceGuaranteedRollup is set "
|
||||
+ "but numShards is missing in partitionsSpec or intervals is missing in granularitySpec"
|
||||
);
|
||||
if (ingestionSchema.getTuningConfig().isForceGuaranteedRollup()) {
|
||||
if (ingestionSchema.getTuningConfig().getNumShards() == null) {
|
||||
throw new ISE("forceGuaranteedRollup is set but numShards is missing in partitionsSpec");
|
||||
}
|
||||
|
||||
if (ingestionSchema.getDataSchema().getGranularitySpec().inputIntervals().isEmpty()) {
|
||||
throw new ISE("forceGuaranteedRollup is set but intervals is missing in granularitySpec");
|
||||
}
|
||||
}
|
||||
|
||||
this.baseFirehoseFactory = (FiniteFirehoseFactory) firehoseFactory;
|
||||
|
|
|
@ -159,8 +159,7 @@ public class MultiPhaseParallelIndexingTest extends AbstractParallelIndexSupervi
|
|||
{
|
||||
expectedException.expect(IllegalStateException.class);
|
||||
expectedException.expectMessage(
|
||||
"forceGuaranteedRollup is set but numShards is missing in partitionsSpec "
|
||||
+ "or intervals is missing in granularitySpec"
|
||||
"forceGuaranteedRollup is set but intervals is missing in granularitySpec"
|
||||
);
|
||||
newTask(
|
||||
null,
|
||||
|
@ -177,8 +176,7 @@ public class MultiPhaseParallelIndexingTest extends AbstractParallelIndexSupervi
|
|||
{
|
||||
expectedException.expect(IllegalStateException.class);
|
||||
expectedException.expectMessage(
|
||||
"forceGuaranteedRollup is set but numShards is missing in partitionsSpec "
|
||||
+ "or intervals is missing in granularitySpec"
|
||||
"forceGuaranteedRollup is set but numShards is missing in partitionsSpec"
|
||||
);
|
||||
newTask(
|
||||
Intervals.of("2017/2018"),
|
||||
|
|
Loading…
Reference in New Issue