Jackie-Jiang commented on a change in pull request #3758: Better handle NPE
from getting instance config
URL: https://github.com/apache/incubator-pinot/pull/3758#discussion_r252001484
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -2203,13 +2202,18 @@ public boolean isSingleTenantCluster() {
* http requests. So, on response, we need mapping from the endpoint to the
* server instances. With BiMap, both mappings are easily available
*/
- @Nonnull
- public BiMap<String, String> getDataInstanceAdminEndpoints(@Nonnull
Set<String> instances)
- throws InvalidConfigException {
+ public @Nonnull
+ BiMap<String, String> getDataInstanceAdminEndpoints(@Nonnull Set<String>
instances)
+ throws InstanceNotFoundException, InvalidConfigException {
Preconditions.checkNotNull(instances);
BiMap<String, String> endpointToInstance =
HashBiMap.create(instances.size());
for (String instance : instances) {
InstanceConfig helixInstanceConfig = getHelixInstanceConfig(instance);
+ if (helixInstanceConfig == null) {
Review comment:
Maybe log an warning and skip this instance?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]