On 9/20/2018 4:10 AM, Srinivas Kashyap wrote:
I'm having problem in setting up SQL server data import handler for Jetty 
container.

Why not just define the datasource directly in the DIH config?

One reason I can think of why you might not want that is that you don't want people to be able to see the user credentials in the admin UI ... but my answer to that is:  Why are you allowing people you don't trust get to your Solr server?  Even without your database credentials, somebody you can't trust is able to cause all sorts of problems.  Solr does have the ability to encrypt passwords in the DIH config, but if your untrusted user is able to get to the filesystem on the Solr server, that is not actually secure.  See this part of the documentation:

https://lucene.apache.org/solr/guide/7_4/uploading-structured-data-store-data-with-the-data-import-handler.html#encrypting-a-database-password

Cassandra, Hoss, and anyone else who lives in the reference guide: This part of the documentation needs to have "echo -n" instead of just "echo" in the commands.  I thought I had fixed this already, but the 7.4 docs don't have it.  If the -n isn't used, things probably won't work right.

Another way around users being able to see DB credentials is to write your own indexing software that's completely separate from Solr.  Note that if you use this approach and make your program multi-threaded, you can index far faster than DIH can. DIH is single-threaded.

If you must use JNDI, you should probably be putting it into the context fragment file, not the places you're putting it currently.  This file is server/contexts/solr-jetty-context.xml if you aren't already aware.

https://wiki.eclipse.org/Jetty/Feature/JNDI

For more in-depth help, consult a Jetty support resource. Solr uses Jetty, but most of us here really don't know that much about it.

Thanks,
Shawn

Reply via email to