Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/HowTo/How to setup SMILA in a cluster"

(Some useful commands)
Line 85: Line 85:
 
=== Some useful commands ===
 
=== Some useful commands ===
  
Removing all documents from a Solr core:
+
Removing all documents from a Solr core (unix-shell command):
  
<code>
+
<source lang="text">
 
curl http://localhost:8983/solr/DefaultCore/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'
 
curl http://localhost:8983/solr/DefaultCore/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'
</code>
+
</source>
  
Optimize Solr index:
+
Optimize Solr index (unix-shell command):
  
<code>
+
<source lang="text">
 
curl http://localhost:8983/solr/DefaultCore/update?commit=true -H "Content-Type: text/xml" --data-binary '<optimize/>'
 
curl http://localhost:8983/solr/DefaultCore/update?commit=true -H "Content-Type: text/xml" --data-binary '<optimize/>'
</code>
+
</source>

Revision as of 08:05, 18 October 2012

Install external Solr server

If you want to use Solr for indexing, you need to setup a separate Solr server, because the Solr instances embedded in SMILA cannot be shared with the other SMILA instances.

Single-Node Server

  • Download a Solr 3.x archive from http://lucene.apache.org/solr/. This HowTo was tested with Solr 3.6.1
  • Unpack the archive to a local directory, you get a directory like /home/smila/solr/apache-solr-3.6.1.
  • Copy the files from SMILA/configuration/org.eclipse.smila.solr to the Solr machine (solr.properties is'nt needed), e.g. to /home/smila/solr/smila-cores
  • Go to /home/smila/solr/apache-solr-3.6.1/example and run:
java -Dsolr.solr.home=/home/smila/solr/smila-cores -jar start.jar

Distributed Server

For larger data volumes you will need to setup Solr in a distributed way, too.

TODO


Setup SMILA on cluster

On each cluster node, you have to do the following SMILA configuration changes.

Cluster configuration

You have to define which nodes belong to the cluster.

Configuration file:
configuration/org.eclipse.smila.clusterconfig.simple/clusterconfig.json

Enter new section "clusterNodes":

{
  "clusterNodes": ["PC-1", "PC-2", "PC-3"],    
  "taskmanager":{
  ...
}

Objectstore configuration

You have to define a shared data directory for all nodes

Configuration file:
configuration/org.eclipse.smila.objectstore.filesystem/objectstoreservice.properties

Set a root path to the shared directory:

 root.path=/data/smila/shared
 ...

Solr configuration

You have to point to the Solr server that you set up above.

Configuration file:
configuration/org.eclipse.smila.solr/solr.properties

 solr.embedded=false
 ...
 solr.serverUrl=http://<SOLR-HOST>:8983/solr

Jetty configuration

To monitor the cluster node, you have to make SMILA HTTP server accessible from external.

File:
SMILA.ini

 ...
 -Djetty.host=0.0.0.0
 ...

See also Enabling Remote Access to SMILA



Some useful commands

Removing all documents from a Solr core (unix-shell command):

curl http://localhost:8983/solr/DefaultCore/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'

Optimize Solr index (unix-shell command):

curl http://localhost:8983/solr/DefaultCore/update?commit=true -H "Content-Type: text/xml" --data-binary '<optimize/>'

Copyright © Eclipse Foundation, Inc. All Rights Reserved.