hqx871 commented on code in PR #13303:
URL: https://github.com/apache/druid/pull/13303#discussion_r1096458943
##########
indexing-hadoop/src/main/java/org/apache/druid/indexer/DeterminePartitionsJob.java:
##########
@@ -346,10 +361,14 @@ protected void innerMap(
rollupGranularity.bucketStart(inputRow.getTimestamp()).getMillis(),
inputRow
);
- context.write(
- new
BytesWritable(HadoopDruidIndexerConfig.JSON_MAPPER.writeValueAsBytes(groupKey)),
- NullWritable.get()
- );
+
+ final byte[] bytes =
HadoopDruidIndexerConfig.JSON_MAPPER.writeValueAsBytes(groupKey);
+ if (sample <= 1 || Math.abs(HASH_FUNCTION.hashBytes(bytes).asInt()) %
sample == 0) {
Review Comment:
Yes, we only need to emit certain group keys.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]