Author: sergiykarpenko
Date: 2010-02-18 03:34:30 -0500 (Thu, 18 Feb 2010)
New Revision: 1882
Modified:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/master.xml
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handler-config.xml
Log:
EXOJCR-490: small updates
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/master.xml
===================================================================
--- jcr/trunk/docs/reference/en/src/main/docbook/en-US/master.xml 2010-02-17 17:07:52 UTC
(rev 1881)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/master.xml 2010-02-18 08:34:30 UTC
(rev 1882)
@@ -66,6 +66,9 @@
<xi:include href="modules/cluster-config.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/jbosscache-configuration-templates.xml"
+
xmlns:xi="http://www.w3.org/2001/XInclude" />
+
<xi:include href="modules/lock-manager-config.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handler-config.xml
===================================================================
---
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handler-config.xml 2010-02-17
17:07:52 UTC (rev 1881)
+++
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handler-config.xml 2010-02-18
08:34:30 UTC (rev 1882)
@@ -1,186 +1,188 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<article>
- <articleinfo>
- <title>QueryHandler configuration</title>
- </articleinfo>
-
- <section>
- <title>How does it work?</title>
-
- <para>Lets talk about indexing content in cluster.</para>
-
- <para>For couple of reasons, we can't replicate index. That's means,
some
- data added and indexed on one cluster node, will be replicated to another
- cluster node, but will not be indexed on that node.</para>
-
- <para>So, how do the indexing works in cluster environment?</para>
-
- <para>As, we can not index same data on all nodes of cluster, we must
- index it on one node. Node, that can index data and do changes on lucene
- index, is called "coordinator". Coordinator-node is choosen automaticaly,
- so we do not need special configuration for coordinator.</para>
-
- <para>But, how can another nodes save their changes to lucene
- index?</para>
-
- <para>First of all, data is already saved and replicated to another
- cluster-nodes, so we need only deliver message like "we need to index this
- data" to coordinator. Thats why Jboss-cache is used.</para>
-
- <para>All nodes of cluster writes messages into JBoss-cache but only
- coordinator takes those messages and makes changes Lucene index.</para>
-
- <para>How do the search works in cluster environment?</para>
-
- <para>Search engine do not works with indexer, coordinator, etc. Search
- needs only lucene index. But only one cluster node can change lucene index
- - asking you. Yes - lucene index is shared. So, all cluster nodes must be
- configured to use lucene index from shared directory.</para>
-
- <para>A little bit about indexing process (no matter, cluster or not)
- Indexer do not writes changes to FS lucene index immediately. At first,
- Indexer writes changes to Volatile index. If Volatile index size become
- 1Mb or more it is flushed to FS. Also there is timer, that flushes
- volatile index by timeout. Volatile index timeout configured by
- "max-volatile-time" paremeter.</para>
-
- <para>Common scheme of Shared Index<mediaobject>
- <imageobject>
- <imagedata fileref="images/diagram-shared-index.png" />
- </imageobject>
- </mediaobject></para>
- </section>
-
- <section>
- <title>Configuration</title>
-
- <section>
- <title>Common requirements</title>
-
- <para>Now, lets see what we need to run Search engine in cluster
- environment.<itemizedlist>
- <listitem>
- <para>shared directory for storing Lucene index (i.e.
NFS);</para>
- </listitem>
-
- <listitem>
- <para>changes filter configured as
-
org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter;</para>
-
- <note>
- <para>This filter ignore changes on non-coordinator nodes, and
- index changes on coordinator node.</para>
- </note>
- </listitem>
-
- <listitem>
- <para>configure JBoss-cache, course;</para>
- </listitem>
- </itemizedlist></para>
- </section>
-
- <section>
- <title>Query-handler configuration</title>
-
- <para>Configuration example:<programlisting><workspace
name="ws">
- <query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir"
value="shareddir/index/db1/ws" />
- <property name="changesfilter-class"
-
value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"
/>
- <property name="jbosscache-configuration"
value="jbosscache-indexer.xml" />
- <property name="jgroups-configuration"
value="udp-mux.xml" />
- <property name="jgroups-multiplexer-stack"
value="true" />
- <property name="jbosscache-cluster-name"
value="JCR-cluster-indexer-ws" />
- <property name="max-volatile-time" value="60"
/>
- </properties>
- </query-handler>
-</workspace></programlisting> <table>
- <title>Config properties description</title>
-
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Property name</entry>
-
- <entry>Description</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>index-dir</entry>
-
- <entry>path to index</entry>
- </row>
-
- <row>
- <entry>jbosscache-configuration</entry>
-
- <entry>template of JBoss-cache configuration for all
- query-handlers in repository</entry>
- </row>
-
- <row>
- <entry>jgroups-configuration</entry>
-
- <entry>jgroups-configuration is template configuration for all
- components (search, cache, locks) [Add link to document
- describing template configurations]</entry>
- </row>
-
- <row>
- <entry>jgroups-multiplexer-stack</entry>
-
- <entry>[TODO about jgroups-multiplexer-stack - add link to
- JBoss doc]</entry>
- </row>
-
- <row>
- <entry>jbosscache-cluster-name</entry>
-
- <entry>cluster name (must be unique)</entry>
- </row>
-
- <row>
- <entry>max-volatile-time</entry>
-
- <entry>max time to live for Volatile Index</entry>
- </row>
- </tbody>
- </tgroup>
- </table></para>
- </section>
-
- <section>
- <title>JBoss-Cache template configuration</title>
-
- <para>JBoss-Cache template configuration for query handler.</para>
-
- <para>jbosscache-indexer.xml<programlisting><?xml
version="1.0" encoding="UTF-8"?>
-<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.1">
-
- <locking useLockStriping="false" concurrencyLevel="50000"
lockParentForChildInsertRemove="false"
- lockAcquisitionTimeout="20000" />
- <!-- Configure the TransactionManager -->
- <transaction
transactionManagerLookupClass="org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup"
/>
-
- <clustering mode="replication"
clusterName="${jbosscache-cluster-name}">
- <stateRetrieval timeout="20000"
fetchInMemoryState="false" />
- <jgroupsConfig multiplexerStack="jcr.stack" />
- <sync />
- </clustering>
- <!-- Eviction configuration -->
- <eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm"
eventQueueSize="1000000">
- <property name="maxNodes" value="10000" />
- <property name="minTimeToLive" value="60000"
/>
- </default>
- </eviction>
-
-</jbosscache></programlisting></para>
- </section>
- </section>
-</article>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<article>
+ <articleinfo>
+ <title>QueryHandler configuration</title>
+ </articleinfo>
+
+ <section>
+ <title>How does it work?</title>
+
+ <para>Lets talk about indexing content in cluster.</para>
+
+ <para>For couple of reasons, we can't replicate index. That's means,
some
+ data added and indexed on one cluster node, will be replicated to another
+ cluster node, but will not be indexed on that node.</para>
+
+ <para><citetitle>So, how do the indexing works in cluster
+ environment?</citetitle></para>
+
+ <para>As, we can not index same data on all nodes of cluster, we must
+ index it on one node. Node, that can index data and do changes on lucene
+ index, is called "coordinator". Coordinator-node is choosen automaticaly,
+ so we do not need special configuration for coordinator.</para>
+
+ <para>But, how can another nodes save their changes to lucene
+ index?</para>
+
+ <para>First of all, data is already saved and replicated to another
+ cluster-nodes, so we need only deliver message like "we need to index this
+ data" to coordinator. Thats why Jboss-cache is used.</para>
+
+ <para>All nodes of cluster writes messages into JBoss-cache but only
+ coordinator takes those messages and makes changes Lucene index.</para>
+
+ <para><citetitle>How do the search works in cluster
+ environment?</citetitle></para>
+
+ <para>Search engine do not works with indexer, coordinator, etc. Search
+ needs only lucene index. But only one cluster node can change lucene index
+ - asking you. Yes - lucene index is shared. So, all cluster nodes must be
+ configured to use lucene index from shared directory.</para>
+
+ <para>A little bit about indexing process (no matter, cluster or not)
+ Indexer do not writes changes to FS lucene index immediately. At first,
+ Indexer writes changes to Volatile index. If Volatile index size become
+ 1Mb or more it is flushed to FS. Also there is timer, that flushes
+ volatile index by timeout. Volatile index timeout configured by
+ "max-volatile-time" paremeter.</para>
+
+ <para>Common scheme of Shared Index<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/diagram-shared-index.png" />
+ </imageobject>
+ </mediaobject></para>
+ </section>
+
+ <section>
+ <title>Configuration</title>
+
+ <section>
+ <title>Common requirements</title>
+
+ <para>Now, lets see what we need to run Search engine in cluster
+ environment.<itemizedlist>
+ <listitem>
+ <para>shared directory for storing Lucene index (i.e.
NFS);</para>
+ </listitem>
+
+ <listitem>
+ <para>changes filter configured as
+
org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter;</para>
+
+ <note>
+ <para>This filter ignore changes on non-coordinator nodes, and
+ index changes on coordinator node.</para>
+ </note>
+ </listitem>
+
+ <listitem>
+ <para>configure JBoss-cache, course;</para>
+ </listitem>
+ </itemizedlist></para>
+ </section>
+
+ <section>
+ <title>Query-handler configuration</title>
+
+ <para>Configuration example:<programlisting><workspace
name="ws">
+ <query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir"
value="shareddir/index/db1/ws" />
+ <property name="changesfilter-class"
+
value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"
/>
+ <property name="jbosscache-configuration"
value="jbosscache-indexer.xml" />
+ <property name="jgroups-configuration"
value="udp-mux.xml" />
+ <property name="jgroups-multiplexer-stack"
value="true" />
+ <property name="jbosscache-cluster-name"
value="JCR-cluster-indexer-ws" />
+ <property name="max-volatile-time" value="60"
/>
+ </properties>
+ </query-handler>
+</workspace></programlisting> <table>
+ <title>Config properties description</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Property name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>index-dir</entry>
+
+ <entry>path to index</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-configuration</entry>
+
+ <entry>template of JBoss-cache configuration for all
+ query-handlers in repository</entry>
+ </row>
+
+ <row>
+ <entry>jgroups-configuration</entry>
+
+ <entry>jgroups-configuration is template configuration for all
+ components (search, cache, locks) [Add link to document
+ describing template configurations]</entry>
+ </row>
+
+ <row>
+ <entry>jgroups-multiplexer-stack</entry>
+
+ <entry>[TODO about jgroups-multiplexer-stack - add link to
+ JBoss doc]</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cluster-name</entry>
+
+ <entry>cluster name (must be unique)</entry>
+ </row>
+
+ <row>
+ <entry>max-volatile-time</entry>
+
+ <entry>max time to live for Volatile Index</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table></para>
+ </section>
+
+ <section>
+ <title>JBoss-Cache template configuration</title>
+
+ <para>JBoss-Cache template configuration for query handler.</para>
+
+ <para>jbosscache-indexer.xml<programlisting><?xml
version="1.0" encoding="UTF-8"?>
+<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.1">
+
+ <locking useLockStriping="false" concurrencyLevel="50000"
lockParentForChildInsertRemove="false"
+ lockAcquisitionTimeout="20000" />
+ <!-- Configure the TransactionManager -->
+ <transaction
transactionManagerLookupClass="org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup"
/>
+
+ <clustering mode="replication"
clusterName="${jbosscache-cluster-name}">
+ <stateRetrieval timeout="20000"
fetchInMemoryState="false" />
+ <jgroupsConfig multiplexerStack="jcr.stack" />
+ <sync />
+ </clustering>
+ <!-- Eviction configuration -->
+ <eviction wakeUpInterval="5000">
+ <default algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm"
eventQueueSize="1000000">
+ <property name="maxNodes" value="10000" />
+ <property name="minTimeToLive" value="60000"
/>
+ </default>
+ </eviction>
+
+</jbosscache></programlisting></para>
+ </section>
+ </section>
+</article>