mcvsubbu commented on a change in pull request #5015: Enhance TableRebalancer
to support reassigning COMPLETED segments when instances changed
URL: https://github.com/apache/incubator-pinot/pull/5015#discussion_r371393133
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/RealtimeSegmentAssignment.java
##########
@@ -143,62 +156,81 @@ public void init(HelixManager helixManager, TableConfig
tableConfig) {
@Override
public Map<String, Map<String, String>> rebalanceTable(Map<String,
Map<String, String>> currentAssignment,
Map<InstancePartitionsType, InstancePartitions> instancePartitionsMap,
Configuration config) {
+ InstancePartitions completedInstancePartitions =
instancePartitionsMap.get(InstancePartitionsType.COMPLETED);
+ InstancePartitions consumingInstancePartitions =
instancePartitionsMap.get(InstancePartitionsType.CONSUMING);
+ Preconditions.checkState(consumingInstancePartitions != null,
+ "Failed to find COMPLETED or CONSUMING instance partitions for table:
%s", _realtimeTableName);
+ Preconditions.checkState(consumingInstancePartitions.getNumPartitions() ==
1,
Review comment:
This statement is a bit confusing. Why should it be that there is only one
partition for consuming stance partitions? Can you add some comments here? The
InstancePartition class says in comments that a "partition" means either field
partition for offline or stream partition for realtime.
----------------------------------------------------------------
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]