SolrCloud on 5.2.1 cluster state
Hello, Is /clusterstate.json in Zookeeper updated with collection state if a collection is created with server running in Solr Cloud mode without creating a core through coreAdmin or providing a core.properties . I find that there is a "state.json" present under /collections/ which reflects the collection status . However dont find the /clusterstate.json updated. Is this an expected behaviour ? Thanks Suma
Re: SolrCloud on 5.2.1 cluster state
Thanks for your response. What version of solr is this change effective from? Will raise a jira. Thanks Suma On Wed, Aug 5, 2015 at 10:37 PM, Erick Erickson wrote: > Yes. The older-style ZK entity was all-in-one > in /clusterstate.json. Recently we've moved > to a per-collection state.json instead, to avoid > the "thundering herd" problem. In that state, > /clusterstate.json is completely ignored and, > as you see, not updated. > > Hmmm, might be worth raising a JIRA to remove > empty clusterstate.json to avoid confusion > > Best, > Erick > > On Wed, Aug 5, 2015 at 11:22 AM, Suma Shivaprasad > wrote: > > Hello, > > > > Is /clusterstate.json in Zookeeper updated with collection state if a > > collection is created with server running in Solr Cloud mode without > > creating a core through coreAdmin or providing a core.properties . I find > > that there is a "state.json" present under /collections/ > > which reflects the collection status . However dont find the > > /clusterstate.json updated. Is this an expected behaviour ? > > > > Thanks > > Suma >
Re: SolrCloud on 5.2.1 cluster state
Thanks Shawn. Does this mean in client code, wherever we are using the API "ZkStateReader.getClusterState.getCollections" to get status should be changed to "CollectionsAdminRequest.ClusterStatus" for each collection or will that API continue to work ? Thanks Suma On Wed, Aug 5, 2015 at 11:00 PM, Shawn Heisey wrote: > On 8/5/2015 9:22 AM, Suma Shivaprasad wrote: > > Hello, > > > > Is /clusterstate.json in Zookeeper updated with collection state if a > > collection is created with server running in Solr Cloud mode without > > creating a core through coreAdmin or providing a core.properties . I find > > that there is a "state.json" present under /collections/ > > which reflects the collection status . However dont find the > > /clusterstate.json updated. Is this an expected behaviour ? > > Yes, that is expected behavior. A separate clusterstate for each > collection was one of the big new features in Solr 5.0: > > https://issues.apache.org/jira/browse/SOLR-5473 > > Thanks, > Shawn > >
Re: SolrCloud on 5.2.1 cluster state
I was having issues since I am using a solr 4.8.1 client to talk to a 5.2.1 server. There is no API in ZKStateReader as well to add a collection to watch in the 4.8.1 API . I assume that would have caused the clusterstate.json to be updated? Since I am using a third party library (which in turn depends on 4.8.1 ) which I cant upgrade due to some reasons, I was trying to get the older version client to talk to 5.2.1 server. Is there any other way I can get the clusterstate.json to be updated with the collections I am interested in? Thanks Suma Thanks Suma On Thu, Aug 6, 2015 at 1:16 AM, Erick Erickson wrote: > The API shouldn't be changing, did you run into any errors? > > Don't bother to raise a JIRA, I checked through IM and the > /clusterstate.json is still being used as a watch point for things > like creating collections, and there are other JIRAs afoot that will > take care of this at the at the right time. > > Best, > Erick > > On Wed, Aug 5, 2015 at 1:54 PM, Suma Shivaprasad > wrote: > > Thanks Shawn. > > > > Does this mean in client code, wherever we are using the API > > > > "ZkStateReader.getClusterState.getCollections" to get status should be > > changed to > > "CollectionsAdminRequest.ClusterStatus" for each collection or will that > > API continue to work ? > > > > Thanks > > Suma > > > > On Wed, Aug 5, 2015 at 11:00 PM, Shawn Heisey > wrote: > > > >> On 8/5/2015 9:22 AM, Suma Shivaprasad wrote: > >> > Hello, > >> > > >> > Is /clusterstate.json in Zookeeper updated with collection state if a > >> > collection is created with server running in Solr Cloud mode without > >> > creating a core through coreAdmin or providing a core.properties . I > find > >> > that there is a "state.json" present under > /collections/ > >> > which reflects the collection status . However dont find the > >> > /clusterstate.json updated. Is this an expected behaviour ? > >> > >> Yes, that is expected behavior. A separate clusterstate for each > >> collection was one of the big new features in Solr 5.0: > >> > >> https://issues.apache.org/jira/browse/SOLR-5473 > >> > >> Thanks, > >> Shawn > >> > >> >
Re: SolrCloud on 5.2.1 cluster state
Thanks for clarifying On Thu, Aug 6, 2015 at 6:43 PM, Shawn Heisey wrote: > On 8/6/2015 6:50 AM, Suma Shivaprasad wrote: > > I was having issues since I am using a solr 4.8.1 client to talk to a > 5.2.1 > > server. There is no API in ZKStateReader as well to add a collection to > > watch in the 4.8.1 API . I assume that would have caused the > > clusterstate.json to be updated? > > > > Since I am using a third party library (which in turn depends on 4.8.1 ) > > which I cant upgrade due to some reasons, I was trying to get the older > > version client to talk to 5.2.1 server. > > > > Is there any other way I can get the clusterstate.json to be updated with > > the collections I am interested in? > > Cross-version compatibility is a strong goal with SolrJ, but that is > mostly applicable to the client objects that have been around since the > beginning (before SolrCloud entered the picture), like HttpSolrClient. > > CloudSolrClient/CloudSolrServer is especially sensitive to version > differences. SolrCloud internals are in constant flux currently, > because devs are frequently thinking of better ways to do things and > fixing bugs. > > If you are able to get any part of a 4.8.1 CloudSolrServer client to > work with a 5.2.1 SolrCloud install, then I'm impressed, in particular > because the client is older than the server and the MAJOR version number > is different. The older client expects all collections to be in the > main clusterstate.json, but on a 5.x server, they are not -- each > collection has its own state.json. > > Using a *newer* SolrJ version than your Solr version is much more likely > to work. > > Thanks, > Shawn > >