Jackie-Jiang commented on code in PR #16334:
URL: https://github.com/apache/pinot/pull/16334#discussion_r2255389495
##########
pinot-broker/src/main/java/org/apache/pinot/broker/routing/instanceselector/BaseInstanceSelector.java:
##########
@@ -301,6 +305,18 @@ void updateSegmentMaps(IdealState idealState, ExternalView
externalView, Set<Str
_oldSegmentCandidatesMap.put(segment, candidates);
}
}
+ pools.clear();
Review Comment:
(minor) Move this into the if check
##########
pinot-broker/src/test/java/org/apache/pinot/broker/routing/instanceselector/InstanceSelectorTest.java:
##########
@@ -236,14 +237,14 @@ public void testInstanceSelector() {
ZkHelixPropertyStore<ZNRecord> propertyStore =
mock(ZkHelixPropertyStore.class);
BrokerMetrics brokerMetrics = mock(BrokerMetrics.class);
BalancedInstanceSelector balancedInstanceSelector =
- new BalancedInstanceSelector(offlineTableName, propertyStore,
brokerMetrics, null, Clock.systemUTC(), false,
- 300);
+ new BalancedInstanceSelector(offlineTableName, propertyStore,
brokerMetrics, null,
+ Clock.systemUTC(), INSTANCE_SELECTOR_CONFIG);
Review Comment:
(format) Fix the indentation
##########
pinot-broker/src/main/java/org/apache/pinot/broker/routing/instanceselector/InstanceSelectorConfig.java:
##########
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.broker.routing.instanceselector;
+
+public class InstanceSelectorConfig {
+ private final boolean _useFixedReplica;
+ private final long _newSegmentExpirationTimeInSeconds;
+ private final boolean _emitSinglePoolSegments;
Review Comment:
(minor) Also change the getter name
```suggestion
private final boolean _emitSinglePoolSegmentsMetric;
```
--
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]