From hibernate-commits at lists.jboss.org Tue Nov 17 13:00:05 2009
Content-Type: multipart/mixed; boundary="===============1001913529087683638=="
MIME-Version: 1.0
From: hibernate-commits at lists.jboss.org
To: hibernate-commits at lists.jboss.org
Subject: [hibernate-commits] Hibernate SVN: r17996 - in search/trunk/src/main:
java/org/hibernate/search/backend/impl/jgroups and 1 other directory.
Date: Tue, 17 Nov 2009 13:00:05 -0500
Message-ID: <200911171800.nAHI05vO008880@svn01.web.mwc.hst.phx2.redhat.com>
--===============1001913529087683638==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: sannegrinovero
Date: 2009-11-17 13:00:05 -0500 (Tue, 17 Nov 2009)
New Revision: 17996
Modified:
search/trunk/src/main/docbook/en-US/modules/architecture.xml
search/trunk/src/main/docbook/en-US/modules/configuration.xml
search/trunk/src/main/java/org/hibernate/search/backend/impl/jgroups/JGr=
oupsBackendQueueProcessorFactory.java
Log:
HSEARCH-409 Write documentation for JGroups based configuration (Lukasz Mor=
en)
Modified: search/trunk/src/main/docbook/en-US/modules/architecture.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- search/trunk/src/main/docbook/en-US/modules/architecture.xml 2009-11-17=
09:07:29 UTC (rev 17995)
+++ search/trunk/src/main/docbook/en-US/modules/architecture.xml 2009-11-17=
18:00:05 UTC (rev 17996)
@@ -174,6 +174,15 @@
local copy of the index.
=
+
+ JGroups
+
+ The JGroups based back end works similarly as the JMS one. De=
signed on the same
+ master/slave pattern, instead of JMS the JGroups toolkit is used as=
a replication mechanism.
+ This back end can be used as an alternative to JMS one when respons=
e time is still critical,
+ but i.e. JNDI service is not available.
+
+
Hibernate Search is an extensible architecture. Feel free to d=
rop
ideas for other third party back ends to
hibernate-dev(a)lists.jboss.org.
Modified: search/trunk/src/main/docbook/en-US/modules/configuration.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- search/trunk/src/main/docbook/en-US/modules/configuration.xml 2009-11-1=
7 09:07:29 UTC (rev 17995)
+++ search/trunk/src/main/docbook/en-US/modules/configuration.xml 2009-11-1=
7 18:00:05 UTC (rev 17996)
@@ -390,8 +390,8 @@
=
Out of the box support for the Apache Lucene back end a=
nd
the JMS back end. Default to lucene. Suppor=
ts
- also jms and
- blackhole.
+ also jms, blackhole,
+ jgroupsMaster and jgroupsSlave.
=
@@ -442,6 +442,34 @@
lookup the JMS queue from. The queue will be used to post work
messages.
+ =
+
+ hibernate.search.worker.jgroups.clusterName
+
+ Optional for JGroups back end. Defines the name of JGrou=
ps channel.
+
+ =
+
+ hibernate.search.worker.jgroups.configurationFi=
le
+
+ Optional JGroups network stack configuration. Defines th=
e name of a JGroups
+ configuration file, which must exist on classpath.
+
+
+
+ hibernate.search.worker.jgroups.configurationXm=
l
+
+ Optional JGroups network stack configuration.
+ Defines a String representing JGroups configuration as XML.
+
+ =
+
+ hibernate.search.worker.jgroups.configurationS=
tring
+
+ Optional JGroups network stack configuration.
+ Provides JGroups configuration in plain text.
+
+
@@ -578,6 +606,102 @@
=
+
+ JGroups Master/Slave configuration
+ Describes how to configure JGroups Master/Slave back end.
+ Configuration examples illustrated in JMS Master/Slave configu=
ration
+ section () also apply here, on=
ly
+ a different backend needs to be set.
+
+
+ Slave nodes
+ Every index update operation is sent through a JGroups c=
hannel to the master node. Index
+ querying operations are executed on a local index copy.
+
+ JGroups Slave configuration
+
+### slave configuration
+## Backend configuration
+hibernate.search.worker.backend =3D jgroupsSlave
+
+
+
+
+
+ Master node
+ Every index update operation is taken from a JGroups cha=
nnel and
+ executed. The master index is copied on a regular basis.
+
+ JGroups Master configuration
+
+### master configuration
+## Backend configuration
+hibernate.search.worker.backend =3D jgroupsMaster
+
+
+
+
+ JGroups channel configuration
+ Optionally configuration for JGroups transport protocols
+ (UDP, TCP) and channel name can be defined. It can be applied =
to both master and slave nodes.
+ There are several ways to configure JGroups transport details.
+ If it is not defined explicity, configuration found in the
+ flush-udp.xml file is used.
+ JGroups transport protocols configuration
+
+## configuration
+#udp.xml file needs to be located in the classpath
+hibernate.search.worker.backend.jgroups.configurationFile =3D udp.xml
+
+#protocol stack configuration provided in XML format
+hibernate.search.worker.backend.jgroups.configurationXml =3D
+
+<config xmlns=3D"urn:org:jgroups"
+xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation=3D"urn:org:jgroups file:schema/JGroups-2.8.xsd">
+<UDP
+mcast_addr=3D"${jgroups.udp.mcast_addr:228.10.10.10}"
+mcast_port=3D"${jgroups.udp.mcast_port:45588}"
+tos=3D"8"
+thread_naming_pattern=3D"pl"
+thread_pool.enabled=3D"true"
+thread_pool.min_threads=3D"2"
+thread_pool.max_threads=3D"8"
+thread_pool.keep_alive_time=3D"5000"
+thread_pool.queue_enabled=3D"false"
+thread_pool.queue_max_size=3D"100"
+thread_pool.rejection_policy=3D"Run"/>
+<PING timeout=3D"1000" num_initial_members=3D"3"/>
+<MERGE2 max_interval=3D"30000" min_interval=3D"10000"/>
+<FD_SOCK/>
+<FD timeout=3D"3000" max_tries=3D"3"/>
+<VERIFY_SUSPECT timeout=3D"1500"/>
+<pbcast.STREAMING_STATE_TRANSFER/>
+<pbcast.FLUSH timeout=3D"0"/>
+</config>
+
+#protocol stack configuration provided in "old style" jgroups format
+hibernate.search.worker.backend.jgroups.configurationString =3D
+
+UDP(mcast_addr=3D228.1.2.3;mcast_port=3D45566;ip_ttl=3D32):PING(timeout=3D=
3000;
+num_initial_members=3D6):FD(timeout=3D5000):VERIFY_SUSPECT(timeout=3D1500):
+pbcast.NAKACK(gc_lag=3D10;retransmit_timeout=3D3000):UNICAST(timeout=3D500=
0):
+FRAG:pbcast.GMS(join_timeout=3D3000;shun=3Dfalse;print_local_addr=3Dtrue)
+
+
+
+ Master and slave nodes communicate over JGroups channel
+ that is identified by this same name. Name of the channe=
l can be defined
+ explicity, if not default HSearchCluster is used.
+ JGroups channel name configuration
+
+## Backend configuration
+hibernate.search.worker.backend.jgroups.clusterName =3D Hibernate-Search-C=
luster
+
+
+
+
+ =
Reader strategy configuration
=
Modified: search/trunk/src/main/java/org/hibernate/search/backend/impl/jgro=
ups/JGroupsBackendQueueProcessorFactory.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- search/trunk/src/main/java/org/hibernate/search/backend/impl/jgroups/JG=
roupsBackendQueueProcessorFactory.java 2009-11-17 09:07:29 UTC (rev 17995)
+++ search/trunk/src/main/java/org/hibernate/search/backend/impl/jgroups/JG=
roupsBackendQueueProcessorFactory.java 2009-11-17 18:00:05 UTC (rev 17996)
@@ -97,11 +97,11 @@
}
=
/**
- * Reads congiguration and builds channnel with its base.
+ * Reads configuration and builds channnel with its base.
* In order of preference - we first look for an external JGroups file, t=
hen a set of XML properties, and
* finally the legacy JGroups String properties.
*
- * @param props configuratuion file
+ * @param props configuration file
*/
private void buildChannel(Properties props) {
String cfg;
--===============1001913529087683638==--