saurabhd336 commented on code in PR #10255: URL: https://github.com/apache/pinot/pull/10255#discussion_r1119869074
########## pinot-common/src/main/java/org/apache/pinot/common/metadata/ZKMetadataProvider.java: ########## @@ -261,6 +263,20 @@ public static UserConfig getUserConfig(ZkHelixPropertyStore<ZNRecord> propertySt } } + @Nullable + public static List<InstancePartitions> getAllInstancePartitions(HelixPropertyStore<ZNRecord> propertyStore) { + List<ZNRecord> znRecordss = + propertyStore.getChildren(PROPERTYSTORE_INSTANCE_PARTITIONS_PREFIX, null, AccessOption.PERSISTENT); + + try { + return Optional.ofNullable(znRecordss).orElseGet(ArrayList::new).stream().map(InstancePartitions::fromZNRecord) + .collect(Collectors.toList()); + } catch (Exception e) { + LOGGER.error("Caught exception while getting user list configuration", e); Review Comment: Ack -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org