SOLR-10105

That JIRA is about trying to load classes for the JDBCStream from the
runtime lib. Might be useful for what you are trying to do. It hasn't been
committed but the idea is there.

Kevin Risden
Hadoop Tech Lead | Avalon Consulting, LLC
M: 732 213 8417
<sent from my phone>

On Apr 25, 2017 18:25, "Joel Bernstein" <[email protected]> wrote:

> There are a few stream impl's that have access to SolrCore
> (ClassifyStream, AnalyzeEvaluator) because they use analyzers. These
> classes have been added to core. We could move the JdbcStream to core as
> well if it makes the user experience nicer.
>
> Originally the idea was that you could run the Streaming API Java classes
> like you would other Solrj clients. I think over time this may become
> important again, as I believe there is work underway for spinning up worker
> nodes that are not attached to a SolrCore.
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Tue, Apr 25, 2017 at 3:25 PM, Dyer, James <[email protected]
> > wrote:
>
>> Using JDBCStream, Solr cannot find my database driver if I put the .jar
>> in the shared lib directory ($SOLR_HOME/lib).  In order for the classloader
>> to find it, the driver has to be in the server's lib directory.  Looking at
>> why, I see that to get the full classpath, including what is in the shared
>> lib directory, we'd typically get a reference to a SolrCore, call
>> "getResourceLoader" and then "findClass".  This makes use of the
>> URLClassLoader that knows about the shared lib.
>>
>>
>>
>> But fixing JDBCStream to do this might not be so easy?  Best I can tell,
>> Streaming Expressions are written nearly stand-alone as client code that
>> merely executes in the Solr JVM.  Is this correct?  Indeed, the code itself
>> is included with the client, in the SolrJ package, despite it mostly being
>> server-side code … Maybe I misunderstand?
>>
>>
>>
>> On the one hand, it isn't a huge deal as to where you need to put your
>> drivers to make this work.  But on the other hand, it isn't really the best
>> user experience, in my opinion at least, to have to dig around the server
>> directories to find where your driver needs to go.  And also, if this is
>> truly server-side code, why do we ship it with the client jar?  Unless
>> there is a desire to make a stand-alone Streaming Expression engine that
>> interacts with Solr as a client, would it be acceptable to somehow expose
>> the SolrCore to it for loading resources like this?
>>
>>
>>
>> *James Dyer*
>>
>> Ingram Content Group
>>
>>
>>
>
>
>

Reply via email to