You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/09/18 23:54:46 UTC

[GitHub] [incubator-druid] jihoonson commented on a change in pull request #8507: Rename partition spec fields

jihoonson commented on a change in pull request #8507: Rename partition spec fields
URL: https://github.com/apache/incubator-druid/pull/8507#discussion_r325940615
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/indexer/partitions/HashedPartitionsSpec.java
 ##########
 @@ -50,15 +51,18 @@ public HashedPartitionsSpec(
       @Nullable List<String> partitionDimensions
   )
   {
-    this(null, maxRowsPerSegment, numShards, partitionDimensions);
+    this(maxRowsPerSegment, numShards, partitionDimensions, null);
   }
 
   @JsonCreator
   public HashedPartitionsSpec(
-      @JsonProperty("targetPartitionSize") @Deprecated @Nullable Integer targetPartitionSize,
-      @JsonProperty("maxRowsPerSegment") @Nullable Integer maxRowsPerSegment,
+      @JsonProperty(PartitionsSpec.MAX_ROWS_PER_SEGMENT) @Nullable Integer maxRowsPerSegment,
 
 Review comment:
   > You mean to rename "targetPartitionSize" in HashedPartitionsSpec to "targetRowsPerSegment"? My understanding is that hashed partitions do not have a "target" size as it is really a "max" size (which is why the former is deprecated).
   
   Ah sorry, probably there was some misunderstanding. `targetPartitionSize` i n`HashedPartitionsSpec` (which I deprecated in favor of `maxRowsPerSegment`) is actually the target number of rows per segment. You can see how to compute `numShards` based on `targetPartitionSize` [here](https://github.com/apache/incubator-druid/blob/master/indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java#L633-L643). So, IMO, `targetRowsPerSegment` makes most sense for it too.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org