mirror of
https://github.com/apache/druid.git
synced 2025-02-09 11:34:54 +00:00
fail early if there is no input data for batch hadoop indexing
This commit is contained in:
parent
a54f93ea42
commit
6a0405de20
@ -169,7 +169,11 @@ public class IndexGeneratorJob implements Jobby
|
|||||||
|
|
||||||
SortableBytes.useSortableBytesAsMapOutputKey(job);
|
SortableBytes.useSortableBytesAsMapOutputKey(job);
|
||||||
|
|
||||||
job.setNumReduceTasks(Iterables.size(config.getAllBuckets().get()));
|
int numReducers = Iterables.size(config.getAllBuckets().get());
|
||||||
|
if(numReducers == 0) {
|
||||||
|
throw new RuntimeException("No buckets?? seems there is no data to index.");
|
||||||
|
}
|
||||||
|
job.setNumReduceTasks(numReducers);
|
||||||
job.setPartitionerClass(IndexGeneratorPartitioner.class);
|
job.setPartitionerClass(IndexGeneratorPartitioner.class);
|
||||||
|
|
||||||
setReducerClass(job);
|
setReducerClass(job);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user