mirror of https://github.com/apache/druid.git
Merge pull request #1179 from himanshug/batch_ingest_no_data
fail early if there is no input data found for batch hadoop indexing
This commit is contained in:
commit
88a1d1e048
|
@ -169,7 +169,11 @@ public class IndexGeneratorJob implements Jobby
|
|||
|
||||
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);
|
||||
|
||||
setReducerClass(job);
|
||||
|
|
Loading…
Reference in New Issue