Add check for valid rowFlushBoundary configuration and fix tests

This commit is contained in:
nishant 2015-06-10 21:38:34 +05:30
parent 191b302f6a
commit 963682d696
3 changed files with 4 additions and 3 deletions

View File

@ -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;

View File

@ -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
);

View File

@ -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
);