'Refresh metadata of all datasources in the cluster
If ``datasource_name`` is specified, only that datasource is updated'

def refresh_datasources(self, datasource_name=None, merge_flag=False):

    self.druid_version = self.get_druid_version()
    for datasource in self.get_datasources():
        if (datasource not in conf.get('DRUID_DATA_SOURCE_BLACKLIST', [])):
            if ((not datasource_name) or (datasource_name == datasource)):
                DruidDatasource.sync_to_db(datasource, self, merge_flag)
