- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Connecting to Solrcloud from Hue
Created on ‎09-21-2015 05:29 PM - edited ‎09-16-2022 02:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We like to connect to SolrCloud from Hue.
By putting this configuration
[search]
# URL of the Solr Server
solr_url=http://SOLR_HOST:8983/solr
we could connect to the host and can see the shards of the indexes living in that host.
But we want to connect to ZooKeeper coordination service ensemble and we want to get the shards of all the indexes from every host in Solrcloud.
Hue is started as a service through Cloudera Manager. But our SolrCloud is running outside Cloudera Manager cluster in another set of nodes. Can you please how do I point to zookeeper ensemble?
Thanks.
Created ‎09-22-2015 01:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a problem about how we list the collections that does not seem to
work with upstream Solr.
We are fixing this in this jira: https://issues.cloudera.org/browse/HUE-2961
In your code if you replace the collection function by the content of
collection2 it should work:
https://github.com/cloudera/hue/blob/master/desktop/libs/libsolr/src/libsolr/api.py#L433
Romain
Created ‎09-22-2015 11:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And the last thing would be to remove the
'.key()'
of
https://github.com/cloudera/hue/blob/master/apps/search/src/search/search_controller.py#L121
and it should work (I just tested it on upstream Solr 5.3)
Romain
Created ‎09-21-2015 05:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All the collections will appear normally though.
Does it answer your question?
Romain
Created ‎09-22-2015 11:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Romain for your quick reply.
When I connect to the host using solr_url, I only see shards/ replicas from that host.
How will this host I am pointing to, knows about all the collections in solrcoud?
Zookeeper will have that information. And we are not pointing to zookeeper in Hue.
Am I missing something here? Can you please help?
Thanks.
Created ‎09-22-2015 12:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in Cloud mode (Cloud section in the left menu of http://localhost:8983/solr
)?
Romain
Created ‎09-22-2015 01:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is how we bring up Solr instances (Solrcloud outside Cloudera Manager)
bin/solr start -e cloud -z iphost-10-0-1-01:2181,iphost-10-0-1-02:2181,iphost-10-0-1-03:2181
and this is our Zookeeper ensemble,
iphost-10-0-1-01:2181,iphost-10-0-1-02:2181,iphost-10-0-1-03:2181
We do have "-e cloud" to say this is cloud
As I stated before, Hue is running inside our Cloudera cluster and has it's own Zookeeper ensemble running inside Cloudera.
Thanks for looking into this!
Created ‎09-22-2015 01:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Romain,
I can confirm solr is running in cloud mode. I also see cloud on the left side in Solr UI.
I don't think there are any issues with our Solrcloud installation, as we could connect to the same solrcloud
from fusion product (from Lucidworks) and we can see all Solr collections.
We connected using Zookeeper ensemble in Fusion case.
Thanks!
Created ‎09-22-2015 01:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a problem about how we list the collections that does not seem to
work with upstream Solr.
We are fixing this in this jira: https://issues.cloudera.org/browse/HUE-2961
In your code if you replace the collection function by the content of
collection2 it should work:
https://github.com/cloudera/hue/blob/master/desktop/libs/libsolr/src/libsolr/api.py#L433
Romain
Created ‎09-22-2015 05:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Romain,
Thanks for creating a JIRA ticket and also information about the fix.
Just to confirm, you basically want me to do this, right? Thanks again!
def collections(self):
try:
params = self._get_params() + (
('action', 'LIST'),
('wt', 'json'),
)
return self._root.get('admin/collections', params=params)['collections']
except RestException, e:
raise PopupException(e, title=_('Error while accessing Solr'))
Created ‎09-22-2015 11:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And the last thing would be to remove the
'.key()'
of
https://github.com/cloudera/hue/blob/master/apps/search/src/search/search_controller.py#L121
and it should work (I just tested it on upstream Solr 5.3)
Romain
Created on ‎09-23-2015 11:38 AM - edited ‎09-23-2015 11:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Romain! I made both the changes you outlined and it works now. I can see the collections.
I will be doing more testing and will let you know, if we see any other issues.
Thank you so much.
