You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/06/12 15:33:05 UTC

[GitHub] mistercrunch commented on a change in pull request #5183: fetch datasources from broker endpoint when refresh new datasources

mistercrunch commented on a change in pull request #5183: fetch datasources from broker endpoint when refresh new datasources
URL: https://github.com/apache/incubator-superset/pull/5183#discussion_r194785964
 
 

 ##########
 File path: superset/connectors/druid/models.py
 ##########
 @@ -126,14 +126,19 @@ def get_base_coordinator_url(self):
             self.coordinator_host, self.coordinator_port)
         return '{base_url}/{self.coordinator_endpoint}'.format(**locals())
 
+    def get_base_broker_url(self):
+        base_url = self.get_base_url(
+            self.broker_host, self.broker_port)
+        return '{base_url}/{self.broker_endpoint}'.format(**locals())
+
     def get_pydruid_client(self):
         cli = PyDruid(
             self.get_base_url(self.broker_host, self.broker_port),
             self.broker_endpoint)
         return cli
 
     def get_datasources(self):
-        endpoint = self.get_base_coordinator_url() + '/datasources'
+        endpoint = self.get_base_broker_url() + '/datasources'
 
 Review comment:
   I think `get_base_coordinator_url` can now be removed. Looks like it's also referenced in `tests/druid_tests.py`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org