You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/08/23 23:16:29 UTC
[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request
#4545: Add APIs to get leader for all tables or a given table
mcvsubbu commented on a change in pull request #4545: Add APIs to get leader for all tables or a given table
URL: https://github.com/apache/incubator-pinot/pull/4545#discussion_r316489952
##########
File path: pinot-common/src/main/java/org/apache/pinot/common/utils/helix/LeadControllerUtils.java
##########
@@ -58,4 +65,15 @@ public static String generatePartitionName(int partitionId) {
public static int extractPartitionId(String partitionName) {
return Integer.parseInt(partitionName.substring(partitionName.lastIndexOf('_') + 1));
}
+
+ /**
+ * Checks from ZK if resource config of leadControllerResource is enabled.
+ */
+ public static boolean isLeadControllerResourceEnabled(HelixManager helixManager) {
+ HelixDataAccessor helixDataAccessor = helixManager.getHelixDataAccessor();
+ PropertyKey propertyKey = helixDataAccessor.keyBuilder().resourceConfig(Helix.LEAD_CONTROLLER_RESOURCE_NAME);
+ ResourceConfig resourceConfig = helixDataAccessor.getProperty(propertyKey);
+ String enableResource = resourceConfig.getSimpleConfig(Helix.LEAD_CONTROLLER_RESOURCE_ENABLED_KEY);
Review comment:
s/enableResource/resourceEnabled/
----------------------------------------------------------------
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@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org