You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Aswath Srinivasan (TMS)" <as...@toyota.com> on 2016/01/07 23:11:19 UTC

Solrcloud for Java 1.6

Hi fellow developers,

I have a situation where the search front-end application is using java 1.6. Upgrading Java version is out of the question.

Planning to use Solrcloud 5.x version for the search implementation. The show stopper here is, solrj for solrcloud needs atleast java1.7

What best can be done to use the latest version of solrcloud and solrj for a portal that runs on java 1.6?

I was thinking, in solrj, instead of using zookeeper (which also acts as the load balancer) I can mention the exact replica's http://solr-cloud-HOST:PORT pairs using some kind of round-robin with some external load balancer.

Any suggestion is highly appreciated.

Aswath NS


Re: Solrcloud for Java 1.6

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/7/2016 3:11 PM, Aswath Srinivasan (TMS) wrote:
> I have a situation where the search front-end application is using java 1.6. Upgrading Java version is out of the question.
>
> Planning to use Solrcloud 5.x version for the search implementation. The show stopper here is, solrj for solrcloud needs atleast java1.7
>
> What best can be done to use the latest version of solrcloud and solrj for a portal that runs on java 1.6?

The last version of Solr (and SolrJ) that supports Java 6 is 4.7.2.  I
would strongly NOT recommend using the CloudSolrServer object from SolrJ
4.7.2 with SolrCloud 5.x.  SolrCloud is evolving *very* quickly from
version to version, so different versions may not work together well. 
With the difference being a *major* version, I would not be surprised if
doesn't work at all.

> I was thinking, in solrj, instead of using zookeeper (which also acts as the load balancer) I can mention the exact replica's http://solr-cloud-HOST:PORT pairs using some kind of round-robin with some external load balancer.

You have two choices here, assuming you'll be using SolrJ 4.7.2.

One choice is to put a load balancer in front of your SolrCloud and use
that host in the HttpSolrServer object.  I use haproxy for a Solr load
balancer, it works very well.

The other choice is to put all of the server URLs into an instance of
LBHttpSolrServer.  I have never used this object, but this is the same
object that CloudSolrServer uses internally, so it should work.  It will
not respond as quickly to clusterstate changes as CloudSolrServer would,
because it cannot talk to Zookeeper.

Cross-version compatibility with HttpSolrServer and LBHttpSolrServer
should be very good.  It's just CloudSolrServer that doesn't work well
when you mix versions.

Thanks,
Shawn


Re: Solrcloud for Java 1.6

Posted by Zap Org <za...@gmail.com>.
hello shawn yes it is written in a style readble with java 7 what i have
done is, altered the syntax into java 6 and then compile and it is 100%
working. if you need, i can send you the jar.

On Fri, Jan 8, 2016 at 11:59 AM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 1/7/2016 10:59 PM, Zap Org wrote:
> > i have solr5.0.0 installed in one machine with JVM specs java 1.7 32GB
> RAM
> > now from another machine i am sending query request to this machine with
> > specs JAVA 1.6
> > so what really happening solr5.0.0 (1.7) is communicating with
> > solrj5.0.0(1.6)
>
> The system with SolrJ 5.0.0 must have a newer Java version installed.
> It is simply not possible to run Solr or SolrJ 5.0.0 with Java 6.
>
> If you attempt to run version 4.8 or later with Java 6, you'll get an
> error that looks like this:
>
> Exception in thread "main" java.lang.UnsupportedClassVersionError:
> org/apache/solr/xxx/yyy: Unsupported major.minor version 51.0
>
> Here is some information about what the specific major.minor version
> number means:
>
> http://stackoverflow.com/a/11432195
>
> Just for giggles, I attempted to compile SolrJ (which is a standalone
> module not dependent on the rest of Solr) in the branch_5x checkout with
> the build script changed to produce jars compatible with version 1.6.
> It would not compile when the target was set to 1.6, because the way the
> code is written *requires* Java 7, and has since version 4.8.
>
> Thanks,
> Shawn
>
>

Re: Solrcloud for Java 1.6

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/7/2016 10:59 PM, Zap Org wrote:
> i have solr5.0.0 installed in one machine with JVM specs java 1.7 32GB RAM
> now from another machine i am sending query request to this machine with
> specs JAVA 1.6
> so what really happening solr5.0.0 (1.7) is communicating with
> solrj5.0.0(1.6)

The system with SolrJ 5.0.0 must have a newer Java version installed.
It is simply not possible to run Solr or SolrJ 5.0.0 with Java 6.

If you attempt to run version 4.8 or later with Java 6, you'll get an
error that looks like this:

Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/apache/solr/xxx/yyy: Unsupported major.minor version 51.0

Here is some information about what the specific major.minor version
number means:

http://stackoverflow.com/a/11432195

Just for giggles, I attempted to compile SolrJ (which is a standalone
module not dependent on the rest of Solr) in the branch_5x checkout with
the build script changed to produce jars compatible with version 1.6.
It would not compile when the target was set to 1.6, because the way the
code is written *requires* Java 7, and has since version 4.8.

Thanks,
Shawn


Re: Solrcloud for Java 1.6

Posted by Zap Org <za...@gmail.com>.
i have solr5.0.0 installed in one machine with JVM specs java 1.7 32GB RAM
now from another machine i am sending query request to this machine with
specs JAVA 1.6
so what really happening solr5.0.0 (1.7) is communicating with
solrj5.0.0(1.6)


provide your architecture detail ill further explain it

On Fri, Jan 8, 2016 at 10:54 AM, Aswath Srinivasan (TMS) <
aswath.srinivasan@toyota.com> wrote:

> Thanks for the responses guys.
>
> >> i have solrj5 client for 1.7 converted into 1.6
>
> Can you please explain this part with little more details?
>
> Thank you,
> Aswath NS
>
>
> -----Original Message-----
> From: Aswath Srinivasan (TMS) [mailto:aswath.srinivasan@toyota.com]
> Sent: Thursday, January 07, 2016 9:51 PM
> To: solr-user@lucene.apache.org
> Subject: RE: Solrcloud for Java 1.6
>
> Thanks for the responses guys.
>
> >> i have solrj5 client for 1.7 converted into 1.6
>
> Can you please explain in part with little more details?
>
> Thank you,
> Aswath NS
>
> -----Original Message-----
> From: Zap Org [mailto:zaporg22@gmail.com]
> Sent: Thursday, January 07, 2016 9:44 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Solrcloud for Java 1.6
>
> i have solrj5 client for 1.7 converted into 1.6 and solr instances running
> with 1.7. I am connecting solrj (1.6) wit solr instances(1.7) on two
> different machines
>
> On Fri, Jan 8, 2016 at 8:26 AM, <bi...@gmail.com> wrote:
>
> > Run it on 2 separate boxes
> >
> > Bill Bell
> > Sent from mobile
> >
> >
> > > On Jan 7, 2016, at 3:11 PM, Aswath Srinivasan (TMS) <
> > aswath.srinivasan@toyota.com> wrote:
> > >
> > > Hi fellow developers,
> > >
> > > I have a situation where the search front-end application is using
> > > java
> > 1.6. Upgrading Java version is out of the question.
> > >
> > > Planning to use Solrcloud 5.x version for the search implementation.
> > > The
> > show stopper here is, solrj for solrcloud needs atleast java1.7
> > >
> > > What best can be done to use the latest version of solrcloud and
> > > solrj
> > for a portal that runs on java 1.6?
> > >
> > > I was thinking, in solrj, instead of using zookeeper (which also
> > > acts as
> > the load balancer) I can mention the exact replica's
> > http://solr-cloud-HOST:PORT pairs using some kind of round-robin with
> > some external load balancer.
> > >
> > > Any suggestion is highly appreciated.
> > >
> > > Aswath NS
> > >
> >
>

RE: Solrcloud for Java 1.6

Posted by "Aswath Srinivasan (TMS)" <as...@toyota.com>.
Thanks for the responses guys.

>> i have solrj5 client for 1.7 converted into 1.6

Can you please explain this part with little more details?

Thank you,
Aswath NS


-----Original Message-----
From: Aswath Srinivasan (TMS) [mailto:aswath.srinivasan@toyota.com] 
Sent: Thursday, January 07, 2016 9:51 PM
To: solr-user@lucene.apache.org
Subject: RE: Solrcloud for Java 1.6

Thanks for the responses guys.

>> i have solrj5 client for 1.7 converted into 1.6

Can you please explain in part with little more details?

Thank you,
Aswath NS

-----Original Message-----
From: Zap Org [mailto:zaporg22@gmail.com]
Sent: Thursday, January 07, 2016 9:44 PM
To: solr-user@lucene.apache.org
Subject: Re: Solrcloud for Java 1.6

i have solrj5 client for 1.7 converted into 1.6 and solr instances running with 1.7. I am connecting solrj (1.6) wit solr instances(1.7) on two different machines

On Fri, Jan 8, 2016 at 8:26 AM, <bi...@gmail.com> wrote:

> Run it on 2 separate boxes
>
> Bill Bell
> Sent from mobile
>
>
> > On Jan 7, 2016, at 3:11 PM, Aswath Srinivasan (TMS) <
> aswath.srinivasan@toyota.com> wrote:
> >
> > Hi fellow developers,
> >
> > I have a situation where the search front-end application is using 
> > java
> 1.6. Upgrading Java version is out of the question.
> >
> > Planning to use Solrcloud 5.x version for the search implementation. 
> > The
> show stopper here is, solrj for solrcloud needs atleast java1.7
> >
> > What best can be done to use the latest version of solrcloud and 
> > solrj
> for a portal that runs on java 1.6?
> >
> > I was thinking, in solrj, instead of using zookeeper (which also 
> > acts as
> the load balancer) I can mention the exact replica's 
> http://solr-cloud-HOST:PORT pairs using some kind of round-robin with 
> some external load balancer.
> >
> > Any suggestion is highly appreciated.
> >
> > Aswath NS
> >
>

RE: Solrcloud for Java 1.6

Posted by "Aswath Srinivasan (TMS)" <as...@toyota.com>.
Thanks for the responses guys.

>> i have solrj5 client for 1.7 converted into 1.6

Can you please explain in part with little more details?

Thank you,
Aswath NS
Mobile  +1 424 345 5340
Office    +1 310 468 6729

-----Original Message-----
From: Zap Org [mailto:zaporg22@gmail.com] 
Sent: Thursday, January 07, 2016 9:44 PM
To: solr-user@lucene.apache.org
Subject: Re: Solrcloud for Java 1.6

i have solrj5 client for 1.7 converted into 1.6 and solr instances running with 1.7. I am connecting solrj (1.6) wit solr instances(1.7) on two different machines

On Fri, Jan 8, 2016 at 8:26 AM, <bi...@gmail.com> wrote:

> Run it on 2 separate boxes
>
> Bill Bell
> Sent from mobile
>
>
> > On Jan 7, 2016, at 3:11 PM, Aswath Srinivasan (TMS) <
> aswath.srinivasan@toyota.com> wrote:
> >
> > Hi fellow developers,
> >
> > I have a situation where the search front-end application is using 
> > java
> 1.6. Upgrading Java version is out of the question.
> >
> > Planning to use Solrcloud 5.x version for the search implementation. 
> > The
> show stopper here is, solrj for solrcloud needs atleast java1.7
> >
> > What best can be done to use the latest version of solrcloud and 
> > solrj
> for a portal that runs on java 1.6?
> >
> > I was thinking, in solrj, instead of using zookeeper (which also 
> > acts as
> the load balancer) I can mention the exact replica's 
> http://solr-cloud-HOST:PORT pairs using some kind of round-robin with 
> some external load balancer.
> >
> > Any suggestion is highly appreciated.
> >
> > Aswath NS
> >
>

Re: Solrcloud for Java 1.6

Posted by Zap Org <za...@gmail.com>.
i have solrj5 client for 1.7 converted into 1.6 and solr instances running
with 1.7. I am connecting solrj (1.6) wit solr instances(1.7) on two
different machines

On Fri, Jan 8, 2016 at 8:26 AM, <bi...@gmail.com> wrote:

> Run it on 2 separate boxes
>
> Bill Bell
> Sent from mobile
>
>
> > On Jan 7, 2016, at 3:11 PM, Aswath Srinivasan (TMS) <
> aswath.srinivasan@toyota.com> wrote:
> >
> > Hi fellow developers,
> >
> > I have a situation where the search front-end application is using java
> 1.6. Upgrading Java version is out of the question.
> >
> > Planning to use Solrcloud 5.x version for the search implementation. The
> show stopper here is, solrj for solrcloud needs atleast java1.7
> >
> > What best can be done to use the latest version of solrcloud and solrj
> for a portal that runs on java 1.6?
> >
> > I was thinking, in solrj, instead of using zookeeper (which also acts as
> the load balancer) I can mention the exact replica's
> http://solr-cloud-HOST:PORT pairs using some kind of round-robin with
> some external load balancer.
> >
> > Any suggestion is highly appreciated.
> >
> > Aswath NS
> >
>

Re: Solrcloud for Java 1.6

Posted by Walter Underwood <wu...@wunderwood.org>.
You can have multiple Java versions installed on the same system. Well, the same non-Windows system. Use the PATH environment variable to set the right Java for each application.

If you really, really must run Java 1.6 for everything, you will not be running Solr 5.x. I think the switch to require Java 7 was made at some point in the 4.x development.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Jan 7, 2016, at 7:26 PM, billnbell@gmail.com wrote:
> 
> Run it on 2 separate boxes
> 
> Bill Bell
> Sent from mobile
> 
> 
>> On Jan 7, 2016, at 3:11 PM, Aswath Srinivasan (TMS) <as...@toyota.com> wrote:
>> 
>> Hi fellow developers,
>> 
>> I have a situation where the search front-end application is using java 1.6. Upgrading Java version is out of the question.
>> 
>> Planning to use Solrcloud 5.x version for the search implementation. The show stopper here is, solrj for solrcloud needs atleast java1.7
>> 
>> What best can be done to use the latest version of solrcloud and solrj for a portal that runs on java 1.6?
>> 
>> I was thinking, in solrj, instead of using zookeeper (which also acts as the load balancer) I can mention the exact replica's http://solr-cloud-HOST:PORT pairs using some kind of round-robin with some external load balancer.
>> 
>> Any suggestion is highly appreciated.
>> 
>> Aswath NS
>> 


Re: Solrcloud for Java 1.6

Posted by bi...@gmail.com.
Run it on 2 separate boxes

Bill Bell
Sent from mobile


> On Jan 7, 2016, at 3:11 PM, Aswath Srinivasan (TMS) <as...@toyota.com> wrote:
> 
> Hi fellow developers,
> 
> I have a situation where the search front-end application is using java 1.6. Upgrading Java version is out of the question.
> 
> Planning to use Solrcloud 5.x version for the search implementation. The show stopper here is, solrj for solrcloud needs atleast java1.7
> 
> What best can be done to use the latest version of solrcloud and solrj for a portal that runs on java 1.6?
> 
> I was thinking, in solrj, instead of using zookeeper (which also acts as the load balancer) I can mention the exact replica's http://solr-cloud-HOST:PORT pairs using some kind of round-robin with some external load balancer.
> 
> Any suggestion is highly appreciated.
> 
> Aswath NS
>