jon-wei commented on a change in pull request #8273: Fix DeterminePartitionsJob 
reducer when total rows < targetPartitionSize
URL: https://github.com/apache/incubator-druid/pull/8273#discussion_r312301179
 
 

 ##########
 File path: 
indexing-hadoop/src/main/java/org/apache/druid/indexer/DeterminePartitionsJob.java
 ##########
 @@ -691,8 +691,9 @@ protected void innerReduce(Context context, SortableBytes 
keyBytes, Iterable<Dim
             // One more shard to go
             final ShardSpec shardSpec;
 
-            if (currentDimPartition.rows < config.getTargetPartitionSize() * 
SHARD_COMBINE_THRESHOLD) {
-              // Combine with previous shard
+            if (currentDimPartition.rows < config.getTargetPartitionSize() * 
SHARD_COMBINE_THRESHOLD &&
+                currentDimPartitions.partitions.size() > 0) {
 
 Review comment:
   weird, GH didn't pick up my latest commit

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to