mirror of https://github.com/apache/druid.git
Add check for valid rowFlushBoundary configuration and fix tests
This commit is contained in:
parent
191b302f6a
commit
963682d696
|
@ -501,6 +501,7 @@ public class IndexTask extends AbstractFixedIntervalTask
|
|||
)
|
||||
{
|
||||
this.targetPartitionSize = targetPartitionSize == 0 ? DEFAULT_TARGET_PARTITION_SIZE : targetPartitionSize;
|
||||
Preconditions.checkArgument(rowFlushBoundary >= 0, "rowFlushBoundary should be positive or zero");
|
||||
this.rowFlushBoundary = rowFlushBoundary == 0 ? DEFAULT_ROW_FLUSH_BOUNDARY : rowFlushBoundary;
|
||||
this.numShards = numShards == null ? -1 : numShards;
|
||||
this.indexSpec = indexSpec == null ? DEFAULT_INDEX_SPEC : indexSpec;
|
||||
|
|
|
@ -75,7 +75,7 @@ public class TaskSerdeTest
|
|||
)
|
||||
),
|
||||
new IndexTask.IndexIOConfig(new LocalFirehoseFactory(new File("lol"), "rofl", null)),
|
||||
new IndexTask.IndexTuningConfig(10000, -1, -1, indexSpec)
|
||||
new IndexTask.IndexTuningConfig(10000, 10, -1, indexSpec)
|
||||
),
|
||||
jsonMapper
|
||||
);
|
||||
|
|
|
@ -364,7 +364,7 @@ public class TaskLifecycleTest
|
|||
IR("2010-01-02T01", "a", "c", 1)
|
||||
)
|
||||
)),
|
||||
new IndexTask.IndexTuningConfig(10000, -1, -1, indexSpec)),
|
||||
new IndexTask.IndexTuningConfig(10000, 10, -1, indexSpec)),
|
||||
TestUtils.MAPPER
|
||||
);
|
||||
|
||||
|
@ -418,7 +418,7 @@ public class TaskLifecycleTest
|
|||
)
|
||||
),
|
||||
new IndexTask.IndexIOConfig(newMockExceptionalFirehoseFactory()),
|
||||
new IndexTask.IndexTuningConfig(10000, -1, -1, indexSpec)
|
||||
new IndexTask.IndexTuningConfig(10000, 10, -1, indexSpec)
|
||||
),
|
||||
TestUtils.MAPPER
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue