exo-jcr SVN: r5547 - in jcr/trunk: exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration and 1 other directory.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2012-01-31 12:57:20 -0500 (Tue, 31 Jan 2012)
New Revision: 5547
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/RepositoryServiceConfiguration.java
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml
Log:
EXOJCR-1737: Gives a way to get the configuration of the repositories/workspaces at Runtime
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/RepositoryServiceConfiguration.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/RepositoryServiceConfiguration.java 2012-01-31 15:59:04 UTC (rev 5546)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/RepositoryServiceConfiguration.java 2012-01-31 17:57:20 UTC (rev 5547)
@@ -19,12 +19,21 @@
package org.exoplatform.services.jcr.config;
import org.exoplatform.commons.utils.SecurityHelper;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.annotations.ManagedDescription;
+import org.exoplatform.management.jmx.annotations.NameTemplate;
+import org.exoplatform.management.jmx.annotations.Property;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
import org.jibx.runtime.BindingDirectory;
import org.jibx.runtime.IBindingFactory;
+import org.jibx.runtime.IMarshallingContext;
import org.jibx.runtime.IUnmarshallingContext;
import org.jibx.runtime.JiBXException;
+import java.io.IOException;
import java.io.InputStream;
+import java.io.StringWriter;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.LinkedHashMap;
@@ -40,9 +49,11 @@
* @author <a href="mailto:gennady.azarenkov@exoplatform.com">Gennady Azarenkov </a>
* @version $Id: RepositoryServiceConfiguration.java 2038 2005-10-05 16:50:11Z geaz $
*/
-
+@Managed
+@NameTemplate(@Property(key = "service", value = "RepositoryServiceConfiguration"))
public class RepositoryServiceConfiguration extends AbstractRepositoryServiceConfiguration
{
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.RepositoryServiceConfiguration"); //NOSONAR
public RepositoryServiceConfiguration()
{
@@ -180,4 +191,37 @@
{
}
+ @Managed
+ @ManagedDescription("The configuration of all the repositories in XML format.")
+ public String getConfigurationXML()
+ {
+ StringWriter sw = new StringWriter();
+ try
+ {
+ IBindingFactory bfact = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
+ IMarshallingContext mctx = bfact.createMarshallingContext();
+ mctx.setIndent(2);
+ mctx.marshalDocument(this, "UTF-8", null, sw);
+ }
+ catch (Exception e)
+ {
+ LOG.warn("Cannot convert the configuration to XML format", e);
+ return null;
+ }
+ finally
+ {
+ try
+ {
+ sw.close();
+ }
+ catch (IOException ignore)
+ {
+ if (LOG.isTraceEnabled())
+ {
+ LOG.trace("An exception occurred: " + ignore.getMessage());
+ }
+ }
+ }
+ return sw.toString();
+ }
}
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml 2012-01-31 15:59:04 UTC (rev 5546)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml 2012-01-31 17:57:20 UTC (rev 5547)
@@ -275,7 +275,7 @@
<entry>acl-bloomfilter-false-positive-probability</entry>
<entry>ACL Bloom-filter desired false positive probability. Range
- [0..1]. Default value 0.1d. (See the note below) </entry>
+ [0..1]. Default value 0.1d. (See the note below)</entry>
</row>
<row>
@@ -514,4 +514,18 @@
</listitem>
</orderedlist>
</section>
+
+ <section>
+ <title>Getting the effective configuration at Runtime of all the
+ repositories</title>
+
+ <para>The effective configuration of all the repositories and their
+ workspaces can be known thanks to the method
+ <emphasis>getConfigurationXML</emphasis>() that is exposed through JMX at
+ the <emphasis>RepositoryServiceConfiguration</emphasis> level. This method
+ will give you the effective configuration in XML format that has been
+ really interpreted by the the JCR core. This could be helpful to
+ understand how your repositories/workspaces are configured especially if
+ you would like to overwrite the configuration for some reasons.</para>
+ </section>
</chapter>
12 years, 2 months
exo-jcr SVN: r5546 - in jcr/trunk: exo.jcr.component.core.impl.infinispan.v5 and 10 other directories.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2012-01-31 10:59:04 -0500 (Tue, 31 Jan 2012)
New Revision: 5546
Added:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.cmd
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/binary-assembly.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/zip-bundle-assembly.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/readme.txt
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/CacheServer.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/cache-server-configuration.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/distributed-cache-configuration.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-data.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-indexer.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-lock.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/distributed-cache-configuration.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-lock.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml
jcr/trunk/pom.xml
Log:
EXOJCR-1682: Upgrade to ISPN 5.1.0.FINAL and JGroups 3.0.3.Final, cache server scripts and build and related doc (jcr)
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.cmd
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.cmd (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.cmd 2012-01-31 15:59:04 UTC (rev 5546)
@@ -0,0 +1 @@
+java -Djava.net.preferIPv4Stack=true -Xms128m -Xmx512m -jar exo.jcr.component.core.impl.infinispan.v5-binary.jar %*
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh 2012-01-31 15:59:04 UTC (rev 5546)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+java -Djava.net.preferIPv4Stack=true -Xms128m -Xmx512m -jar exo.jcr.component.core.impl.infinispan.v5-binary.jar $*
Property changes on: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -43,9 +43,9 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.exoplatform.ws</groupId>
- <artifactId>exo.ws.commons</artifactId>
- <scope>test</scope>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.commons</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
@@ -55,7 +55,7 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.commons.test</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.ext.rpc.impl.jgroups.v3</artifactId>
@@ -72,8 +72,8 @@
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
</exclusion>
- </exclusions>
- </dependency>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.component.core</artifactId>
@@ -85,7 +85,7 @@
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
</exclusion>
- </exclusions>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
@@ -114,20 +114,20 @@
<artifactId>jgroups</artifactId>
</exclusion>
</exclusions>
- </dependency>
+ </dependency>
<!-- TCK binaries and deps for repo stub, some eXo API test -->
<dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-core</artifactId>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-core</artifactId>
</dependency>
<dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-cachestore-jdbc</artifactId>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-cachestore-jdbc</artifactId>
</dependency>
<dependency>
- <groupId>javax.resource</groupId>
- <artifactId>connector-api</artifactId>
- <scope>test</scope>
+ <groupId>javax.resource</groupId>
+ <artifactId>connector-api</artifactId>
+ <scope>test</scope>
</dependency>
<!-- ===== Databases JDBC support for tests ===== -->
<dependency>
@@ -135,8 +135,8 @@
<artifactId>hsqldb</artifactId>
<scope>test</scope>
</dependency>
- </dependencies>
- <!-- ======================================================================= -->
+ </dependencies>
+ <!-- ======================================================================= -->
<build>
<resources>
<resource>
@@ -186,7 +186,7 @@
<property>
<name>cache-enabled</name>
<value>${cache.enabled}</value>
- </property>
+ </property>
<property>
<name>value-storage-enabled</name>
<value>${value.storage.enabled}</value>
@@ -196,20 +196,19 @@
<value>${use.distributed.cache}</value>
</property>
<property>
- <name>JDBCWorkspaceDataContainer.statistics.enabled</name>
- <value>${statistics.enabled}</value>
+ <name>JDBCWorkspaceDataContainer.statistics.enabled</name>
+ <value>${statistics.enabled}</value>
</property>
<property>
- <name>exo.properties.url</name>
- <value>${properties.url.prefix}${properties.url.suffix}</value>
+ <name>exo.properties.url</name>
+ <value>${properties.url.prefix}${properties.url.suffix}</value>
</property>
- <!-- We add this system property due to some incompatibility between IPv6 and
- some JVM of Linux distributions such as Ubuntu and Fedora-->
+ <!-- We add this system property due to some incompatibility between IPv6 and some JVM of Linux distributions such as Ubuntu and Fedora -->
<property>
<name>java.net.preferIPv4Stack</name>
<value>true</value>
</property>
- <!-- Avoid the firewall -->
+ <!-- Avoid the firewall -->
<property>
<name>jgroups.bind_addr</name>
<value>127.0.0.1</value>
@@ -232,8 +231,8 @@
</excludes>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
@@ -257,14 +256,14 @@
<classifier>sources</classifier>
<type>jar</type>
<overWrite>false</overWrite>
- </artifactItem>
+ </artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/jcr-core-tests</outputDirectory>
</configuration>
</execution>
</executions>
- </plugin>
- <plugin>
+ </plugin>
+ <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
@@ -286,7 +285,7 @@
<filter token="TEST_CLASSES" value="${testOutputDirectoryURL}" />
</filterset>
</copy>
- </tasks>
+ </tasks>
</configuration>
<goals>
<goal>run</goal>
@@ -340,13 +339,50 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jar-with-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <primaryArtifact>false</primaryArtifact>
+ <finalName>${project.artifactId}</finalName>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assemblies/binary-assembly.xml</descriptor>
+ </descriptors>
+ <archive>
+ <manifest>
+ <mainClass>org.exoplatform.services.jcr.infinispan.CacheServer</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </execution>
+ <execution>
+ <id>bundle</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assemblies/zip-bundle-assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<profiles>
- <!-- *** -->
- <!-- TCK -->
- <!-- *** -->
- <!-- Use "mvn -Prun-tck" to launch only them -->
+ <!-- *** -->
+ <!-- TCK -->
+ <!-- *** -->
+ <!-- Use "mvn -Prun-tck" to launch only them -->
<profile>
<id>run-tck</id>
<build>
@@ -365,11 +401,11 @@
<property>
<name>emma.coverage.out.file</name>
<value>target/emma/coverage.ec</value>
- </property>
+ </property>
<property>
<name>cache-enabled</name>
<value>${cache.enabled}</value>
- </property>
+ </property>
<property>
<name>value-storage-enabled</name>
<value>${value.storage.enabled}</value>
@@ -378,7 +414,7 @@
<name>use-distributed-cache</name>
<value>${use.distributed.cache}</value>
</property>
- <property>
+ <property>
<name>known.issues</name>
<value>org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreName
org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreOrder2
@@ -400,7 +436,7 @@
<name>java.net.preferIPv4Stack</name>
<value>true</value>
</property>
- <!-- Avoid the firewall -->
+ <!-- Avoid the firewall -->
<property>
<name>jgroups.bind_addr</name>
<value>127.0.0.1</value>
@@ -425,10 +461,10 @@
</plugins>
</build>
</profile>
- <!-- *** -->
- <!-- ALL -->
- <!-- *** -->
- <!-- Use "mvn -Prun-all" to launch default tests and TCK -->
+ <!-- *** -->
+ <!-- ALL -->
+ <!-- *** -->
+ <!-- Use "mvn -Prun-all" to launch default tests and TCK -->
<profile>
<id>run-all</id>
<build>
@@ -438,6 +474,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- TAKE CARE TO UPDATE ALSO run-tck PROFILE -->
+<!-- <argLine>${env.MAVEN_OPTS} -Dcom.arjuna.ats.arjuna.objectstore.objectStoreDir=${project.build.directory} -Djava.security.manager=org.exoplatform.commons.test.TestSecurityManager -Djava.security.policy=${project.build.directory}/test-classes/test.policy -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y</argLine> -->
<argLine>${env.MAVEN_OPTS} -Dcom.arjuna.ats.arjuna.objectstore.objectStoreDir=${project.build.directory} -Djava.security.manager=org.exoplatform.commons.test.TestSecurityManager -Djava.security.policy=${project.build.directory}/test-classes/test.policy</argLine>
<systemProperties>
<property>
@@ -447,15 +484,15 @@
<property>
<name>emma.coverage.out.file</name>
<value>target/emma/coverage.ec</value>
- </property>
+ </property>
<property>
- <name>cache-enabled</name>
- <value>${cache.enabled}</value>
- </property>
+ <name>cache-enabled</name>
+ <value>${cache.enabled}</value>
+ </property>
<property>
- <name>value-storage-enabled</name>
- <value>${value.storage.enabled}</value>
- </property>
+ <name>value-storage-enabled</name>
+ <value>${value.storage.enabled}</value>
+ </property>
<property>
<name>use-distributed-cache</name>
<value>${use.distributed.cache}</value>
@@ -482,7 +519,7 @@
<name>java.net.preferIPv4Stack</name>
<value>true</value>
</property>
- <!-- Avoid the firewall -->
+ <!-- Avoid the firewall -->
<property>
<name>jgroups.bind_addr</name>
<value>127.0.0.1</value>
@@ -580,7 +617,7 @@
<scope>test</scope>
</dependency>
</dependencies>
- </profile>
+ </profile>
<profile>
<id>mysql-5.0</id>
<properties>
@@ -654,7 +691,7 @@
<artifactId>db2jcc_license_cu</artifactId>
<version>9.7</version>
<scope>test</scope>
- </dependency>
+ </dependency>
</dependencies>
</profile>
<profile>
@@ -732,12 +769,12 @@
<jcr.test.configuration.file>/conf/standalone/test-configuration-sjdbc.xml</jcr.test.configuration.file>
<properties.url.suffix>-sjdbc.properties</properties.url.suffix>
</properties>
- </profile>
+ </profile>
<profile>
<id>cluster</id>
<properties>
<jcr.test.configuration.file>/conf/standalone/cluster/test-configuration.xml</jcr.test.configuration.file>
</properties>
- </profile>
+ </profile>
</profiles>
</project>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/binary-assembly.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/binary-assembly.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/binary-assembly.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -0,0 +1,70 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>binary</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}</outputFileNameMapping>
+ <outputDirectory>/</outputDirectory>
+ <unpack>true</unpack>
+ <excludes>
+ <exclude>org.jboss.cache:jbosscache-core</exclude>
+ <exclude>junit:junit</exclude>
+ <exclude>javax.servlet:servlet-api</exclude>
+ <exclude>javax.faces:jsf-api</exclude>
+ <exclude>javax.portlet:portlet-api</exclude>
+ <exclude>jmock:jmock</exclude>
+ <exclude>org.ow2.jotm:*</exclude>
+ <exclude>xdoclet:*</exclude>
+ <exclude>org.exoplatform.tool:exo.tool.framework.junit</exclude>
+ <exclude>org.ow2.carol:*</exclude>
+ <exclude>org.ow2.carol.irmi:irmi</exclude>
+ <exclude>org.ow2.spec.ee:ow2-jta-1.1-spec</exclude>
+ <exclude>org.jacorb:*</exclude>
+ <exclude>quartz:quartz</exclude>
+ <exclude>javax.mail:mail</exclude>
+ <exclude>com.experlog:xapool</exclude>
+ <exclude>antlr:antlr</exclude>
+ <exclude>avalon-framework:avalon-framework</exclude>
+ <exclude>logkit:logkit</exclude>
+ <exclude>org.objectweb.howl:howl</exclude>
+ <exclude>org.jboss.javaee:jboss-transaction-api</exclude>
+ <exclude>org.jboss:jboss-common-core</exclude>
+ <exclude>org.hibernate:*</exclude>
+ </excludes>
+ </dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}</outputFileNameMapping>
+ <outputDirectory>/</outputDirectory>
+ <scope>test</scope>
+ <unpack>true</unpack>
+ <includes>
+ <include>org.slf4j:slf4j-log4j12</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+</assembly>
\ No newline at end of file
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/zip-bundle-assembly.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/zip-bundle-assembly.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/zip-bundle-assembly.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -0,0 +1,49 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>bundle</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <files>
+ <file>
+ <source>target/${project.artifactId}-binary.jar</source>
+ <destName>${project.artifactId}-binary.jar</destName>
+ </file>
+ <file>
+ <source>${basedir}/src/main/doc/readme.txt</source>
+ <destName>readme.txt</destName>
+ </file>
+ </files>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/bin</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*.cmd</include>
+ <include>*.sh</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/readme.txt
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/readme.txt (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/readme.txt 2012-01-31 15:59:04 UTC (rev 5546)
@@ -0,0 +1,18 @@
+To launch the cache server the script corresponding to your OS startCacheServer.cmd on windows
+environment and startCacheServer.sh on unix/linux/macos environments followed by the next optional arguments:
+
+help|?|<configuration-file-path>|udp|tcp <initial-hosts>
+
+ help : Print the expected syntax.
+ ? : Print the expected syntax.
+ configuration-file-path : The location of the configuration file to use, we expect an absolute path. It will try to get it using the current class loader,
+ if it cannot be found it will get it from the file system. By default it will use the path /conf/cache-server-configuration.xml
+ that is actually a file bundled into the jar.
+ udp : We use this parameter value when we want to use the default configuration file with udp as transport stack which is actually
+ the default stack used which means that it will have the exact same behavior as when we don't provide any parameter.
+ tcp : We use this parameter value when we want to use the default configuration file with tcp as transport stack.
+ initial-hosts : This parameter is optional and is only allowed in case the tcp stack is enabled, it will allow you to define the set of
+ hosts that will be part of the cluster. The syntax of this parameter is a list of hostname[port] comma-separated.
+ Knowing that the default value is "localhost[7800],localhost[7801]" if this parameter is not set, the bind address will be
+ automatically set to 127.0.0.1.
+
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/CacheServer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/CacheServer.java 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/CacheServer.java 2012-01-31 15:59:04 UTC (rev 5546)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.infinispan;
+import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.container.StandaloneContainer;
import java.net.URL;
@@ -43,6 +44,21 @@
private static final String DEFAULT_CONFIG_FILE_PATH = "/conf/cache-server-configuration.xml";
+ private static void help(String errorMessage)
+ {
+ StringBuilder sb = new StringBuilder();
+ if (errorMessage != null)
+ {
+ sb.append(errorMessage + ", t");
+ }
+ else
+ {
+ sb.append("T");
+ }
+ sb.append("he expected arguments are: help|?|<configuration-file-path>|udp|tcp <initial-hosts>");
+ System.err.println(sb.toString());//NOSONAR
+ }
+
/**
* @param args
*/
@@ -52,18 +68,55 @@
if (args == null || args.length == 0)
{
configPath = DEFAULT_CONFIG_FILE_PATH;
- System.out.println("The configuration file will be loaded from '" + DEFAULT_CONFIG_FILE_PATH + "'");//NOSONAR
}
else if (args.length == 1)
{
- configPath = args[0];
- System.out.println("The configuration file will be loaded from '" + args[0] + "'");//NOSONAR
+ String arg = args[0];
+ if ("help".equals(arg) || "?".equals(arg))
+ {
+ help(null);
+ return;
+ }
+ else if ("udp".equals(arg))
+ {
+ configPath = DEFAULT_CONFIG_FILE_PATH;
+ }
+ else if ("tcp".equals(arg))
+ {
+ configPath = DEFAULT_CONFIG_FILE_PATH;
+ addTCP2ProfileList();
+ PropertyManager.setProperty("jgroups.bind_addr", "127.0.0.1");
+ System.out.println("No initial hosts have been configured so the bind address "//NOSONAR
+ + "has been automatically set to 127.0.0.1 assuming that it has been properly"
+ + " configured to map to localhost");
+ }
+ else
+ {
+ configPath = arg;
+ }
}
+ else if (args.length == 2)
+ {
+ String arg = args[0];
+ if ("tcp".equals(arg))
+ {
+ configPath = DEFAULT_CONFIG_FILE_PATH;
+ addTCP2ProfileList();
+ PropertyManager.setProperty("jgroups.tcpping.initial_hosts", args[1]);
+ System.out.println("The initial hosts have been configured to:" + args[1]);//NOSONAR
+ }
+ else
+ {
+ help("Unexpected syntax");
+ return;
+ }
+ }
else
{
- System.err.println("Too many arguments, the expected syntax is: java CacheServer <configuration-file-path>");//NOSONAR
+ help("Too many arguments");
return;
}
+ System.out.println("The configuration file will be loaded from '" + configPath + "'");//NOSONAR
URL configUrl = CacheServer.class.getResource(configPath);
if (configUrl != null)
@@ -77,4 +130,18 @@
StandaloneContainer.getInstance();
}
+ private static void addTCP2ProfileList()
+ {
+ String profiles = PropertyManager.getProperty(PropertyManager.RUNTIME_PROFILES);
+ StringBuilder sb = new StringBuilder();
+ if (profiles != null && !profiles.isEmpty())
+ {
+ sb.append(profiles);
+ sb.append(',');
+ }
+ sb.append("tcp");
+ PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, sb.toString());
+ System.out.println("The tcp stack has been enabled");//NOSONAR
+ }
+
}
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java 2012-01-31 15:59:04 UTC (rev 5546)
@@ -35,13 +35,10 @@
import org.infinispan.configuration.global.GlobalConfigurationBuilder;
import org.infinispan.configuration.parsing.ConfigurationBuilderHolder;
import org.infinispan.configuration.parsing.Parser;
-import org.infinispan.distribution.ch.ConsistentHash;
-import org.infinispan.distribution.ch.DefaultConsistentHash;
import org.infinispan.jmx.MBeanServerLookup;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.transaction.lookup.TransactionManagerLookup;
-import org.infinispan.util.Util;
import java.io.IOException;
import java.io.InputStream;
@@ -239,15 +236,6 @@
};
confBuilder.transaction().transactionManagerLookup(tml);
}
- //TODO remove it once ISPN-1687 will be fixed
- confBuilder.storeAsBinary().enabled(false);
- //TODO remove it once ISPN-1689 will be fixed
- confBuilder
- .clustering()
- .hash()
- .consistentHash(
- Util.<ConsistentHash> getInstance(DefaultConsistentHash.class.getName(), Thread.currentThread()
- .getContextClassLoader()));
Configuration conf = holder.getDefaultConfigurationBuilder().build();
// Define the configuration of the cache
manager.defineConfiguration(regionId, conf);
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/cache-server-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/cache-server-configuration.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/cache-server-configuration.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -28,6 +28,18 @@
<name>infinispan-configuration</name>
<value>jar:/conf/distributed-cache-configuration.xml</value>
</value-param>
+ <properties-param>
+ <name>parameters</name>
+ <description>The parameters of the configuration</description>
+ <property name="configurationFile" value="udp-mux.xml"></property>
+ <property name="invalidationThreshold" value="0"></property>
+ </properties-param>
+ <properties-param profiles="tcp">
+ <name>parameters</name>
+ <description>The parameters of the configuration</description>
+ <property name="configurationFile" value="tcp-mux.xml"></property>
+ <property name="invalidationThreshold" value="-1"></property>
+ </properties-param>
</init-params>
</component>
<component>
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/distributed-cache-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/distributed-cache-configuration.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/distributed-cache-configuration.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -25,21 +25,21 @@
<globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
<transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="JCR-cluster" distributedSyncTimeout="20000">
<properties>
- <property name="configurationFile" value="tcp-mux.xml"/>
+ <property name="configurationFile" value="${configurationFile}"/>
</properties>
</transport>
<shutdown hookBehavior="DEFAULT"/>
</global>
<namedCache name="JCRCache">
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="true" />
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="120000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="true" />
<transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" syncRollbackPhase="true" syncCommitPhase="true" eagerLockSingleNode="true" transactionMode="TRANSACTIONAL"/>
<jmxStatistics enabled="true"/>
<clustering mode="distribution">
- <l1 enabled="true" invalidationThreshold="-1"/>
+ <l1 enabled="true" invalidationThreshold="${invalidationThreshold}"/>
<hash numOwners="2" rehashRpcTimeout="120000">
<groups enabled="true"/>
</hash>
- <sync/>
+ <sync replTimeout="180000"/>
</clustering>
</namedCache>
</infinispan>
\ No newline at end of file
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-data.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-data.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-data.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <stateTransfer timeout="20000" fetchInMemoryState="false" />
<sync replTimeout="20000"/>
</clustering>
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-indexer.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-indexer.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-indexer.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <stateTransfer timeout="20000" fetchInMemoryState="false" />
<sync replTimeout="20000"/>
</clustering>
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-lock.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-lock.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-lock.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <stateTransfer timeout="20000" fetchInMemoryState="false" />
<sync replTimeout="20000"/>
</clustering>
@@ -52,7 +52,7 @@
<eviction strategy="NONE"/>
<loaders passivation="false" shared="true" preload="true">
- <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
<properties>
<property name="stringsTableNamePrefix" value="${infinispan-cl-cache.jdbc.table.name}"/>
<property name="idColumnName" value="${infinispan-cl-cache.jdbc.id.column}"/>
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/distributed-cache-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/distributed-cache-configuration.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/distributed-cache-configuration.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -31,7 +31,7 @@
<shutdown hookBehavior="DEFAULT"/>
</global>
<namedCache name="JCRCache">
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="true" />
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="120000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="true" />
<transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" syncRollbackPhase="true" syncCommitPhase="true" eagerLockSingleNode="true" transactionMode="TRANSACTIONAL"/>
<jmxStatistics enabled="true"/>
<clustering mode="distribution">
@@ -39,7 +39,7 @@
<hash numOwners="2" rehashRpcTimeout="120000">
<groups enabled="true"/>
</hash>
- <sync replTimeout="60000"/>
+ <sync replTimeout="180000"/>
</clustering>
</namedCache>
</infinispan>
\ No newline at end of file
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <stateTransfer timeout="20000" fetchInMemoryState="false" />
<sync replTimeout="20000"/>
</clustering>
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <stateTransfer timeout="20000" fetchInMemoryState="false" />
<sync replTimeout="20000"/>
</clustering>
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <stateTransfer timeout="20000" fetchInMemoryState="false" />
<sync replTimeout="20000"/>
</clustering>
@@ -52,7 +52,7 @@
<eviction strategy="NONE"/>
<loaders passivation="false" shared="true" preload="true">
- <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
<properties>
<property name="stringsTableNamePrefix" value="${infinispan-cl-cache.jdbc.table.name}"/>
<property name="idColumnName" value="${infinispan-cl-cache.jdbc.id.column}"/>
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-lock.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-lock.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-lock.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -41,7 +41,7 @@
<eviction strategy="NONE"/>
<loaders passivation="false" shared="true" preload="true">
- <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
<properties>
<property name="stringsTableNamePrefix" value="${infinispan-cl-cache.jdbc.table.name}"/>
<property name="idColumnName" value="${infinispan-cl-cache.jdbc.id.column}"/>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -1347,8 +1347,8 @@
be very generic.</para>
<note>
- <para>All the cache instances that will rely on this cache
- configuration will share the same
+ <para>All the cache instances fo which we configure the same cluster
+ name will also share the same
<envar>EmbeddedCacheManager.</envar></para>
</note>
</section>
@@ -1419,11 +1419,12 @@
/**
* Creates an eXo cache according to the given configuration {@link org.exoplatform.services.cache.ExoCacheConfig}
* @param config the configuration of the cache to apply
- * @param cacheConfig the configuration of the infinispan cache
+ * @param confBuilder the configuration builder of the infinispan cache
* @param cacheGetter a {@link Callable} instance from which we can get the cache
* @exception ExoCacheInitException if an exception happens while initializing the cache
*/
- public ExoCache<Serializable, Object> create(ExoCacheConfig config, Configuration cacheConfig, Callable<Cache<Serializable, Object>> cacheGetter) throws ExoCacheInitException;
+ public ExoCache<Serializable, Object> create(ExoCacheConfig config, ConfigurationBuilder confBuilder,
+ Callable<Cache<Serializable, Object>> cacheGetter) throws ExoCacheInitException;
/**
* Returns the type of {@link org.exoplatform.services.cache.ExoCacheConfig} expected by the creator
@@ -1612,18 +1613,25 @@
<title>Define an infinispan cache instance</title>
<section>
- <title>How to define a distributed or a local cache?</title>
+ <title>How to define a replicated, a distributed or a local
+ cache?</title>
<para>Actually, if you use a custom configuration for your cache as
described in a previous section, we will use the cache mode define in
your configuration file.</para>
<para>In case, you decide to use the default configuration template,
- we use the field <emphasis>distributed</emphasis> of your
- <envar>ExoCacheConfig</envar> to decide. In other words, if the value
- of this field is false (the default value), the cache will be a local
- cache otherwise it will be the cache mode defined in your default
- configuration template that should be distributed.</para>
+ we use the fields <emphasis>distributed</emphasis> and
+ <emphasis>replicated</emphasis> of your <envar>ExoCacheConfig</envar>
+ to decide. In other words, if the value of these fields is false (the
+ default value), the cache will be a local cache otherwise if the field
+ <emphasis>distributed</emphasis> is set to true, the cache will be
+ then be considered as distrbuted and will be retrieved from the
+ <emphasis>DistributedCacheManager</emphasis> (more details about it in
+ the next chapter). Finally if the field
+ <emphasis>replicated</emphasis> is set to true, the cache mode of your
+ cache will be the one defined in the configuration assuming that it
+ should be replicated.</para>
</section>
<section>
@@ -1763,5 +1771,201 @@
</note></para>
</section>
</section>
+
+ <section>
+ <title>Using Infinispan in distributed mode</title>
+
+ <para>In order to be able to use infinispan in distributed mode with the
+ ability to launch external JVM instances that will manage a part of the
+ cache, we need to configure the
+ <emphasis>DistributedCacheManager</emphasis>. In the next sections, we
+ will show how to configure the component and how to launch external JVM
+ instances.</para>
+
+ <section>
+ <title>Configuration of the DistributedCacheManager</title>
+
+ <para>The <emphasis>DistributedCacheManager</emphasis> is the
+ component that will manage all the cache instances that we expect to
+ be distributed, it must be unique in the whole JVM which means that it
+ must be declared at <emphasis>RootContainer</emphasis> level in portal
+ mode or at <emphasis>StandaloneContainer</emphasis> in standalone
+ mode. See below an example of configuration.</para>
+
+ <programlisting language="xml"><component>
+ <type>org.exoplatform.services.ispn.DistributedCacheManager</type>
+ <init-params>
+ <value-param>
+ <name>infinispan-configuration</name>
+ <value>jar:/conf/portal/distributed-cache-configuration.xml</value>
+ </value-param>
+ <properties-param>
+ <name>parameters</name>
+ <description>The parameters of the configuration</description>
+ <property name="infinispan-num-owners" value="1"></property>
+ </properties-param>
+ </init-params>
+</component></programlisting>
+
+ <table>
+ <title>Fields description</title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>infinispan-configuration</entry>
+
+ <entry>Location of the infinispan configuration to use in
+ which all the distributed caches must be configured by name.
+ All paths supported by the ConfigurationManager with prefixes
+ like jar:/..., classpath:/..., etc. This parameter is
+ mandatory.</entry>
+ </row>
+
+ <row>
+ <entry>parameters</entry>
+
+ <entry>In the configuration file, you can add a set of
+ variables of type ${variable-name}, these variables will be
+ solved using the values of the parameters. The name of the
+ variable in the configuration file must match with the name of
+ the parameter. This parameter is optional.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>As described above, the configuration of infinispan must defined
+ explicitly each cache using the <emphasis>nameCache</emphasis> block
+ no dynamic configuration of cache is supported. Indeed to ensure that
+ the whole cluster is consistent in term of defined cache, it is
+ required to configure all the cache that you will need and register it
+ using its future name.</para>
+
+ <para>For now, we have 2 supported cache name which are
+ <emphasis>JCRCache</emphasis> and <emphasis>eXoCache</emphasis>.
+ <emphasis>JCRCache</emphasis> is the name of the cache that we use in
+ case we would like to store the data of the JCR into a distributed
+ cache. <emphasis>eXoCache</emphasis> is the name of the cache that we
+ use in case we would like to store the data of some eXo Cache
+ instances into a distributed cache.</para>
+
+ <para>See below an example of infinispan configuration with only
+ <emphasis>eXoCache</emphasis> defined:</para>
+
+ <programlisting><infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
+ xmlns="urn:infinispan:config:5.1">
+ <global>
+ <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
+ <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="Infinispan-cluster" distributedSyncTimeout="20000">
+ <properties>
+ <property name="configurationFile" value="udp.xml"/>
+ </properties>
+ </transport>
+ <shutdown hookBehavior="DEFAULT"/>
+ </global>
+ <namedCache name="eXoCache">
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="true" />
+ <transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" syncRollbackPhase="true" syncCommitPhase="true" eagerLockSingleNode="true" transactionMode="TRANSACTIONAL"/>
+ <jmxStatistics enabled="true"/>
+ <clustering mode="distribution">
+ <hash numOwners="${infinispan-num-owners}" rehashRpcTimeout="120000" />
+ <sync/>
+ </clustering>
+ <invocationBatching enabled="true"/>
+ </namedCache>
+</infinispan></programlisting>
+ </section>
+
+ <section>
+ <title>Launch a CacheServer</title>
+
+ <para>In case you intend to use the distribued mode, you can launch
+ external JVM in standalone mode to provide more memory to your current
+ cache. To do so, you will need to get the file of type
+ <emphasis>exo.jcr.component.core.impl.infinispan.v5-X.Y.Z-binary.zip</emphasis>
+ in which you will find scripts to launch your cache servers. These
+ scripts allow optional arguments that are described below:</para>
+
+ <para><emphasis>help|?|<configuration-file-path>|udp|tcp
+ <initial-hosts></emphasis></para>
+
+ <table>
+ <title>Arguments description</title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>help</entry>
+
+ <entry>Print the expected syntax.</entry>
+ </row>
+
+ <row>
+ <entry>?</entry>
+
+ <entry>Print the expected syntax.</entry>
+ </row>
+
+ <row>
+ <entry>configuration-file-path</entry>
+
+ <entry>The location of the configuration file to use, we
+ expect an absolute path. It will try to get it using the
+ current class loader, if it cannot be found it will get it
+ from the file system. By default it will use the path
+ <emphasis>/conf/cache-server-configuration.xml</emphasis> that
+ is actually a file bundled into the jar.</entry>
+ </row>
+
+ <row>
+ <entry>udp</entry>
+
+ <entry>We use this parameter value when we want to use the
+ default configuration file with udp as transport stack which
+ is actually the default stack used which means that it will
+ have the exact same behavior as when we don't provide any
+ parameter.</entry>
+ </row>
+
+ <row>
+ <entry>tcp</entry>
+
+ <entry>We use this parameter value when we want to use the
+ default configuration file with tcp as transport
+ stack.</entry>
+ </row>
+
+ <row>
+ <entry>initial-hosts</entry>
+
+ <entry>This parameter is optional and is only allowed in case
+ the tcp stack is enabled, it will allow you to define the set
+ of hosts that will be part of the cluster. The syntax of this
+ parameter is a list of hostname[port] comma-separated. Knowing
+ that the default value is "localhost[7800],localhost[7801]" if
+ this parameter is not set, the bind address will be
+ automatically set to 127.0.0.1 so you need to ensure that your
+ server is configured to have it mapped to localhost.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Configure the cache of your workspace</title>
+
+ <para>In case you would like to configure your workspace in order to
+ rely on a distributed cache apart using
+ <emphasis>org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache</emphasis>
+ as FQN of your cache you will need to set the property
+ <emphasis>use-distributed-cache</emphasis> to
+ <emphasis>true</emphasis>. If you do so the JCR cache will rely on the
+ cache called <emphasis>JCRCache</emphasis> defined in the infinispan
+ configuration provided to the
+ <emphasis>DistributedCacheManager</emphasis>.</para>
+ </section>
+ </section>
</section>
</chapter>
Modified: jcr/trunk/pom.xml
===================================================================
--- jcr/trunk/pom.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/pom.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -397,12 +397,12 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>5.1.0.CR3</version>
+ <version>5.1.0.FINAL</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-cachestore-jdbc</artifactId>
- <version>5.1.0.CR3</version>
+ <version>5.1.0.FINAL</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
12 years, 2 months
exo-jcr SVN: r5545 - in kernel/trunk: exo.kernel.component.ext.cache.impl.infinispan.v5 and 5 other directories.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2012-01-31 10:51:04 -0500 (Tue, 31 Jan 2012)
New Revision: 5545
Modified:
kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/pom.xml
kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java
kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/ispn/DistributedCacheManager.java
kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/resources/conf/portal/cache-configuration-template.xml
kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/cache-configuration-template.xml
kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/distributed-cache-configuration-template.xml
kernel/trunk/exo.kernel.component.ext.rpc.impl.jgroups.v3/pom.xml
kernel/trunk/pom.xml
Log:
EXOJCR-1682: Upgrade to ISPN 5.1.0.FINAL and JGroups 3.0.3.Final (kernel)
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/pom.xml 2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/pom.xml 2012-01-31 15:51:04 UTC (rev 5545)
@@ -34,7 +34,7 @@
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>3.0.2.Final</version>
+ <version>3.0.3.Final</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java 2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java 2012-01-31 15:51:04 UTC (rev 5545)
@@ -41,12 +41,9 @@
import org.infinispan.configuration.global.GlobalConfigurationBuilder;
import org.infinispan.configuration.parsing.ConfigurationBuilderHolder;
import org.infinispan.configuration.parsing.Parser;
-import org.infinispan.distribution.ch.ConsistentHash;
-import org.infinispan.distribution.ch.DefaultConsistentHash;
import org.infinispan.eviction.EvictionStrategy;
import org.infinispan.jmx.MBeanServerLookup;
import org.infinispan.manager.DefaultCacheManager;
-import org.infinispan.util.Util;
import java.io.InputStream;
import java.io.Serializable;
@@ -55,6 +52,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.Callable;
@@ -168,9 +166,6 @@
}
// Initialize the main cache manager
this.cacheManager = initCacheManager(cacheConfigTemplate);
- // Register the main cache manager
- mappingGlobalConfigCacheManager.put(cacheManager.getCacheManagerConfiguration().transport().clusterName(),
- cacheManager);
}
/**
@@ -216,10 +211,11 @@
throw new ExoCacheInitException("Cannot parse the configuration '" + cacheConfigTemplate + "'", e);
}
configureCacheManager(configBuilder);
+ DefaultCacheManager cacheManager;
try
{
// Create the CacheManager from the new configuration
- return new DefaultCacheManager(configBuilder.build(), config);
+ cacheManager = new DefaultCacheManager(configBuilder.build(), config);
}
catch (RuntimeException e) //NOSONAR
{
@@ -227,6 +223,10 @@
"Cannot initialize the CacheManager corresponding to the configuration '" + cacheConfigTemplate
+ "'", e);
}
+ // Register the main cache manager
+ mappingGlobalConfigCacheManager.put(cacheManager.getCacheManagerConfiguration().transport().clusterName(),
+ cacheManager);
+ return cacheManager;
}
});
}
@@ -344,10 +344,9 @@
currentCacheManager =
new DefaultCacheManager(configBuilder.build(), holder.getDefaultConfigurationBuilder()
.build(), false);
- for (ConfigurationBuilder b : holder.getConfigurationBuilders())
+ for (Entry<String, ConfigurationBuilder> entry : holder.getNamedConfigurationBuilders().entrySet())
{
- Configuration c = b.build();
- currentCacheManager.defineConfiguration(c.name(), c);
+ currentCacheManager.defineConfiguration(entry.getKey(), entry.getValue().build());
}
currentCacheManager.start();
// We register this new cache manager
@@ -370,15 +369,6 @@
}
}
confBuilder.read(cacheManager.getDefaultCacheConfiguration());
- //TODO remove it once ISPN-1687 will be fixed
- confBuilder.storeAsBinary().enabled(false);
- //TODO remove it once ISPN-1689 will be fixed
- confBuilder
- .clustering()
- .hash()
- .consistentHash(
- Util.<ConsistentHash> getInstance(DefaultConsistentHash.class.getName(), Thread.currentThread()
- .getContextClassLoader()));
}
else if (config.isDistributed())
{
@@ -399,15 +389,6 @@
if (LOG.isInfoEnabled())
LOG.info("The configuration template will be used for the the cache '" + region + "'.");
confBuilder.read(cacheManager.getDefaultCacheConfiguration());
- //TODO remove it once ISPN-1687 will be fixed
- confBuilder.storeAsBinary().enabled(false);
- //TODO remove it once ISPN-1689 will be fixed
- confBuilder
- .clustering()
- .hash()
- .consistentHash(
- Util.<ConsistentHash> getInstance(DefaultConsistentHash.class.getName(), Thread.currentThread()
- .getContextClassLoader()));
if (!config.isRepicated())
{
// The cache is local
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/ispn/DistributedCacheManager.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/ispn/DistributedCacheManager.java 2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/ispn/DistributedCacheManager.java 2012-01-31 15:51:04 UTC (rev 5545)
@@ -29,21 +29,18 @@
import org.exoplatform.services.log.Log;
import org.exoplatform.services.transaction.TransactionService;
import org.infinispan.Cache;
-import org.infinispan.configuration.cache.Configuration;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.configuration.global.GlobalConfigurationBuilder;
import org.infinispan.configuration.parsing.ConfigurationBuilderHolder;
import org.infinispan.configuration.parsing.Parser;
-import org.infinispan.distribution.ch.ConsistentHash;
-import org.infinispan.distribution.ch.DefaultConsistentHash;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.transaction.lookup.TransactionManagerLookup;
-import org.infinispan.util.Util;
import org.picocontainer.Startable;
import java.security.PrivilegedExceptionAction;
import java.util.Map;
+import java.util.Map.Entry;
import javax.transaction.TransactionManager;
@@ -143,8 +140,7 @@
LOG.debug("The configuration file of the DistributedCacheManager will be loaded from " + configurationFile);
}
final TemplateConfigurationHelper helper =
- new TemplateConfigurationHelper(new String[]{"^jgroups-configuration", "^infinispan-.*"},
- new String[]{"^infinispan-configuration"}, configManager);
+ new TemplateConfigurationHelper(new String[]{"^.*"}, new String[]{}, configManager);
if (LOG.isDebugEnabled() && parameters != null && !parameters.isEmpty())
{
LOG.debug("The parameters to use while processing the configuration file are " + parameters);
@@ -168,21 +164,15 @@
return tm;
}
};
- for (ConfigurationBuilder b : holder.getConfigurationBuilders())
+ for (Entry<String, ConfigurationBuilder> entry : holder.getNamedConfigurationBuilders().entrySet())
{
+ ConfigurationBuilder b = entry.getValue();
if (tm != null)
{
- b.transaction().transactionManagerLookup(tml);
+ b.transaction().transactionManagerLookup(tml);
}
- //TODO remove it once ISPN-1689 will be fixed
- b.clustering()
- .hash()
- .consistentHash(
- Util.<ConsistentHash> getInstance(DefaultConsistentHash.class.getName(), Thread.currentThread()
- .getContextClassLoader()));
- Configuration c = b.build();
- manager.defineConfiguration(c.name(), c);
- manager.getCache(c.name());
+ manager.defineConfiguration(entry.getKey(), b.build());
+ manager.getCache(entry.getKey());
}
return manager;
}
@@ -190,8 +180,8 @@
}
catch (Exception e)//NOSONAR
{
- throw new IllegalStateException("Could not initialize the cache manager corresponding to the configuration file "
- + configurationFile, e);
+ throw new IllegalStateException(
+ "Could not initialize the cache manager corresponding to the configuration file " + configurationFile, e);
}
}
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/resources/conf/portal/cache-configuration-template.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/resources/conf/portal/cache-configuration-template.xml 2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/resources/conf/portal/cache-configuration-template.xml 2012-01-31 15:51:04 UTC (rev 5545)
@@ -58,7 +58,7 @@
<jmxStatistics enabled="true"/>
<invocationBatching enabled="true"/>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
+ <stateTransfer timeout="20000" fetchInMemoryState="false"/>
<sync replTimeout="20000"/>
</clustering>
</default>
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/cache-configuration-template.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/cache-configuration-template.xml 2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/cache-configuration-template.xml 2012-01-31 15:51:04 UTC (rev 5545)
@@ -57,7 +57,7 @@
<transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" syncRollbackPhase="true" syncCommitPhase="true" transactionMode="TRANSACTIONAL"/>
<jmxStatistics enabled="true"/>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
+ <stateTransfer timeout="20000" fetchInMemoryState="false"/>
<sync replTimeout="20000"/>
</clustering>
<invocationBatching enabled="true"/>
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/distributed-cache-configuration-template.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/distributed-cache-configuration-template.xml 2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/distributed-cache-configuration-template.xml 2012-01-31 15:51:04 UTC (rev 5545)
@@ -57,7 +57,7 @@
<transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" syncRollbackPhase="true" syncCommitPhase="true" transactionMode="TRANSACTIONAL"/>
<jmxStatistics enabled="true"/>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
+ <stateTransfer timeout="20000" fetchInMemoryState="false"/>
<sync replTimeout="20000"/>
</clustering>
<invocationBatching enabled="true"/>
Modified: kernel/trunk/exo.kernel.component.ext.rpc.impl.jgroups.v3/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.rpc.impl.jgroups.v3/pom.xml 2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.rpc.impl.jgroups.v3/pom.xml 2012-01-31 15:51:04 UTC (rev 5545)
@@ -40,7 +40,7 @@
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>3.0.2.Final</version>
+ <version>3.0.3.Final</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Modified: kernel/trunk/pom.xml
===================================================================
--- kernel/trunk/pom.xml 2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/pom.xml 2012-01-31 15:51:04 UTC (rev 5545)
@@ -213,7 +213,7 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>5.1.0.CR3</version>
+ <version>5.1.0.FINAL</version>
</dependency>
<dependency>
<groupId>org.jibx</groupId>
12 years, 2 months
exo-jcr SVN: r5544 - in jcr/branches/1.15.x/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/core/query/lucene and 8 other directories.
by do-not-reply@jboss.org
Author: andrew.plotnikov
Date: 2012-01-31 09:11:05 -0500 (Tue, 31 Jan 2012)
New Revision: 5544
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/Reindexable.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/BaseStandaloneTest.java
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestWorkspaceStorageCacheInClusterMode.java
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java
Log:
EXOJCR-1278: added show approximate progress of background re-indexing job
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/Reindexable.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/Reindexable.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/Reindexable.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -47,4 +47,12 @@
*/
boolean isReindexingSupport();
+ /**
+ * Return nodes count.
+ *
+ * @return
+ * nodes count
+ * @throws RepositoryException
+ */
+ Long getNodesCount() throws RepositoryException;
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -47,6 +47,7 @@
import java.io.OutputStream;
import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
+import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -254,6 +255,11 @@
private final IndexerIoModeHandler modeHandler;
/**
+ * Nodes count
+ */
+ private AtomicLong nodesCount;
+
+ /**
* The shutdown hook
*/
private final Thread hook = new Thread()
@@ -380,6 +386,34 @@
}
/**
+ * Create thread finding count of nodes.
+ */
+ private Thread createThreadFindNodesCount(final Reindexable reindexableComponent)
+ {
+ return new Thread("Nodes count(" + handler.getContext().getWorkspaceName() + ")")
+ {
+ public void run()
+ {
+ try
+ {
+ if (reindexableComponent != null)
+ {
+ Long value = reindexableComponent.getNodesCount();
+ if (value != null)
+ {
+ nodesCount = new AtomicLong(value);
+ }
+ }
+ }
+ catch (RepositoryException e)
+ {
+ LOG.error("Can't calculate nodes count : " + e.getMessage());
+ }
+ }
+ };
+ }
+
+ /**
* Returns the number of documents in this index.
*
* @return the number of documents in this index.
@@ -491,12 +525,15 @@
// traverse and index workspace
executeAndLog(new Start(Action.INTERNAL_TRANSACTION));
- long count;
-
// check if we have deal with RDBMS reindexing mechanism
Reindexable rdbmsReindexableComponent =
(Reindexable)handler.getContext().getContainer().getComponent(Reindexable.class);
+ Thread thread = createThreadFindNodesCount(rdbmsReindexableComponent);
+ thread.start();
+
+ long count;
+
if (handler.isRDBMSReindexing() && rdbmsReindexableComponent != null
&& rdbmsReindexableComponent.isReindexingSupport())
{
@@ -1783,7 +1820,8 @@
}
}
- private long createIndex(NodeData node, ItemDataConsumer stateMgr) throws IOException, RepositoryException
+ private long createIndex(NodeData node, ItemDataConsumer stateMgr) throws IOException,
+ RepositoryException
{
MultithreadedIndexing indexing = new MultithreadedIndexing(node, stateMgr);
return indexing.launch(false);
@@ -1811,8 +1849,9 @@
* if the task has been interrupted
*/
private void createIndex(final Queue<Callable<Void>> tasks, final NodeData node, final ItemDataConsumer stateMgr,
- final AtomicLong count) throws IOException, RepositoryException, InterruptedException
+ final AtomicLong count, final AtomicLong processed) throws IOException, RepositoryException, InterruptedException
{
+ processed.incrementAndGet();
if (stopped)
{
throw new InterruptedException();
@@ -1824,9 +1863,19 @@
}
executeAndLog(new AddNode(getTransactionId(), node.getIdentifier(), true));
+
if (count.incrementAndGet() % 1000 == 0)
{
- LOG.info("indexing... {} ({})", node.getQPath().getAsString(), new Long(count.get()));
+ if (nodesCount == null)
+ {
+ LOG.info("indexing... {} ({})", node.getQPath().getAsString(), new Long(count.get()));
+ }
+ else
+ {
+ DecimalFormat format = new DecimalFormat("###.#");
+ LOG.info("indexing... {} ({}%)", node.getQPath().getAsString(),
+ format.format(Math.min(100d * processed.get() / nodesCount.get(), 100)));
+ }
}
synchronized (this)
@@ -1842,14 +1891,14 @@
{
public Void call() throws Exception
{
- createIndex(tasks, node, stateMgr, count, nodeData);
+ createIndex(tasks, node, stateMgr, count, nodeData, processed);
return null;
}
};
if (!tasks.offer(task))
{
// All threads have tasks to do so we do it ourself
- createIndex(tasks, node, stateMgr, count, nodeData);
+ createIndex(tasks, node, stateMgr, count, nodeData, processed);
}
}
}
@@ -1878,7 +1927,8 @@
* if the task has been interrupted
*/
private void createIndex(final Queue<Callable<Void>> tasks, final NodeData node, final ItemDataConsumer stateMgr,
- final AtomicLong count, final NodeData nodeData) throws RepositoryException, IOException, InterruptedException
+ final AtomicLong count, final NodeData nodeData, final AtomicLong processed) throws RepositoryException,
+ IOException, InterruptedException
{
NodeData childState = (NodeData)stateMgr.getItemData(nodeData.getIdentifier());
if (childState == null)
@@ -1889,7 +1939,7 @@
if (nodeData != null)
{
- createIndex(tasks, nodeData, stateMgr, count);
+ createIndex(tasks, nodeData, stateMgr, count, processed);
}
}
@@ -1929,11 +1979,12 @@
* @throws InterruptedException
* if the task has been interrupted
*/
- private void createIndex(final NodeDataIndexingIterator iterator, NodeData rootNode, final AtomicLong count)
- throws RepositoryException, InterruptedException, IOException
+ private void createIndex(final NodeDataIndexingIterator iterator, NodeData rootNode, final AtomicLong count,
+ final AtomicLong processed) throws RepositoryException, InterruptedException, IOException
{
for (NodeDataIndexing node : iterator.next())
{
+ processed.incrementAndGet();
if (stopped)
{
throw new InterruptedException();
@@ -1952,7 +2003,16 @@
executeAndLog(new AddNode(getTransactionId(), node, true));
if (count.incrementAndGet() % 1000 == 0)
{
- LOG.info("indexing... {} ({})", node.getQPath().getAsString(), new Long(count.get()));
+ if (nodesCount == null)
+ {
+ LOG.info("indexing... {} ({})", node.getQPath().getAsString(), count.get());
+ }
+ else
+ {
+ DecimalFormat format = new DecimalFormat("###.#");
+ LOG.info("indexing... {} ({}%)", node.getQPath().getAsString(),
+ format.format(Math.min(100d * processed.get() / nodesCount.get(), 100)));
+ }
}
synchronized (this)
@@ -1983,7 +2043,8 @@
* if thread was interrupted
*/
private void createIndex(final Queue<Callable<Void>> tasks, final NodeDataIndexingIterator iterator,
- final NodeData rootNode, final AtomicLong count) throws IOException, RepositoryException, InterruptedException
+ final NodeData rootNode, final AtomicLong count, final AtomicLong processing) throws IOException,
+ RepositoryException, InterruptedException
{
while (iterator.hasNext())
{
@@ -1992,7 +2053,7 @@
{
public Void call() throws Exception
{
- createIndex(iterator, rootNode, count);
+ createIndex(iterator, rootNode, count, processing);
return null;
}
};
@@ -2000,7 +2061,7 @@
if (!tasks.offer(task))
{
// All threads have tasks to do so we do it ourself
- createIndex(iterator, rootNode, count);
+ createIndex(iterator, rootNode, count, processing);
}
}
}
@@ -3405,6 +3466,8 @@
*/
private final AtomicLong count = new AtomicLong();
+ private final AtomicLong processing = new AtomicLong();
+
/**
* The list of indexing tasks left to do
*/
@@ -3511,7 +3574,7 @@
{
public Void call() throws Exception
{
- createIndex(tasks, node, stateMgr, count);
+ createIndex(tasks, node, stateMgr, count, processing);
return null;
}
});
@@ -3531,7 +3594,7 @@
{
public Void call() throws Exception
{
- createIndex(tasks, iterator, rootNode, count);
+ createIndex(tasks, iterator, rootNode, count, processing);
return null;
}
});
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -195,6 +195,11 @@
*/
protected String FIND_NODES_AND_PROPERTIES;
+ /**
+ * FIND_NODES_COUNT
+ */
+ protected String FIND_NODES_COUNT;
+
// ======================== ITEMS table ========================
/**
* COLUMN_ID.
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -199,6 +199,8 @@
protected PreparedStatement findNodesAndProperties;
+ protected PreparedStatement findNodesCount;
+
/**
* Read-only flag, if true the connection is marked as READ-ONLY.
*/
@@ -560,6 +562,11 @@
{
findNodesAndProperties.close();
}
+
+ if (findNodesCount != null)
+ {
+ findNodesCount.close();
+ }
}
catch (SQLException e)
{
@@ -1351,6 +1358,33 @@
}
}
+ /**
+ * Reads count of nodes in workspace.
+ *
+ * @return
+ * nodes count
+ * @throws RepositoryException
+ * if a database access error occurs
+ */
+ public long getNodesCount() throws RepositoryException
+ {
+ ResultSet countNodes;
+ try
+ {
+ countNodes = findNodesCount();
+ if (countNodes.next())
+ {
+ return countNodes.getLong(1);
+ }
+ }
+ catch (SQLException e)
+ {
+ throw new RepositoryException(e);
+ }
+
+ throw new RepositoryException("Can not calculate nodes count");
+ }
+
// ------------------ Private methods ---------------
/**
@@ -2702,6 +2736,8 @@
protected abstract int updatePropertyByIdentifier(int version, int type, String identifier) throws SQLException;
+ protected abstract ResultSet findNodesCount() throws SQLException;
+
// -------- values processing ------------
protected abstract int addValueData(String cid, int orderNumber, InputStream stream, int streamLength,
String storageId) throws SQLException;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -1401,8 +1401,24 @@
{
return connFactory.isReindexingSupport();
}
-
+
/**
+ * {@inheritDoc}
+ */
+ public Long getNodesCount() throws RepositoryException
+ {
+ WorkspaceStorageConnection conn = connFactory.openConnection();
+ try
+ {
+ return conn.getNodesCount();
+ }
+ finally
+ {
+ conn.close();
+ }
+ }
+
+ /**
* Get the data source from the InitialContext and wraps it into a {@link ManagedDataSource}
* in case it has been configured as managed
*/
@@ -1439,4 +1455,5 @@
return DBConstants.DB_DIALECT_GENERIC; // by default
}
+
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -155,6 +155,8 @@
DELETE_ITEM = "delete from JCR_MITEM where ID=?";
DELETE_VALUE = "delete from JCR_MVALUE where PROPERTY_ID=?";
DELETE_REF = "delete from JCR_MREF where PROPERTY_ID=?";
+
+ FIND_NODES_COUNT = "select count(*) from JCR_MITEM I where I.I_CLASS=1";
}
/**
@@ -601,4 +603,17 @@
}
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ResultSet findNodesCount() throws SQLException
+ {
+ if (findNodesCount != null)
+ {
+ findNodesCount = dbConnection.prepareStatement(FIND_NODES_COUNT);
+ }
+ return findNodesCount.executeQuery();
+ }
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -164,6 +164,8 @@
DELETE_ITEM = "delete from JCR_SITEM where ID=?";
DELETE_VALUE = "delete from JCR_SVALUE where PROPERTY_ID=?";
DELETE_REF = "delete from JCR_SREF where PROPERTY_ID=?";
+
+ FIND_NODES_COUNT = "select count(*) from JCR_SITEM I where I.I_CLASS=1 and I.CONTAINER_NAME=?";
}
/**
@@ -627,4 +629,24 @@
}
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ResultSet findNodesCount() throws SQLException
+ {
+ if (findNodesCount == null)
+ {
+ findNodesCount = dbConnection.prepareStatement(FIND_NODES_COUNT);
+ }
+ else
+ {
+ findNodesCount.clearParameters();
+ }
+
+ findNodesCount.setString(1, containerName);
+
+ return findNodesCount.executeQuery();
+ }
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -225,6 +225,8 @@
"select I.PARENT_ID, I.P_TYPE "
+ " from JCR_MITEM I where I.I_CLASS=2 and (I.NAME='[http://www.exoplatform.com/jcr/exo/1.0]owner'"
+ " or I.NAME='[http://www.exoplatform.com/jcr/exo/1.0]permissions')";
+
+ FIND_NODES_COUNT = "select count(*) from JCR_MITEM I where I.I_CLASS=1";
}
/**
@@ -1082,4 +1084,18 @@
}
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ResultSet findNodesCount() throws SQLException
+ {
+ if (findNodesCount != null)
+ {
+ findNodesCount = dbConnection.prepareStatement(FIND_NODES_COUNT);
+ }
+ return findNodesCount.executeQuery();
+ }
+
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -234,6 +234,8 @@
+ " from JCR_SITEM I where I.I_CLASS=2 and I.CONTAINER_NAME=?"
+ " and (I.NAME='[http://www.exoplatform.com/jcr/exo/1.0]owner'"
+ " or I.NAME='[http://www.exoplatform.com/jcr/exo/1.0]permissions')";
+
+ FIND_NODES_COUNT = "select count(*) from JCR_SITEM I where I.I_CLASS=1 and I.CONTAINER_NAME=?";
}
/**
@@ -952,7 +954,7 @@
findACLHolders.setString(1, containerName);
return findACLHolders.executeQuery();
- }
+ }
/**
* {@inheritDoc}
@@ -1006,4 +1008,24 @@
}
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ResultSet findNodesCount() throws SQLException
+ {
+ if (findNodesCount == null)
+ {
+ findNodesCount = dbConnection.prepareStatement(FIND_NODES_COUNT);
+ }
+ else
+ {
+ findNodesCount.clearParameters();
+ }
+
+ findNodesCount.setString(1, containerName);
+
+ return findNodesCount.executeQuery();
+ }
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -186,6 +186,8 @@
*/
private static final String ADD_NODE_DATA_DESCR = "addNodeData";
+ private static final String NODES_COUNT = "getNodesCount";
+
/**
* The global statistics for all the database accesses
*/
@@ -217,6 +219,8 @@
ALL_STATISTICS.put(GET_REFERENCES_DATA_DESCR, new Statistics(GLOBAL_STATISTICS, GET_REFERENCES_DATA_DESCR));
ALL_STATISTICS.put(GET_VALUE_DESCR, new Statistics(GLOBAL_STATISTICS, GET_VALUE_DESCR));
ALL_STATISTICS.put(GET_ACL_HOLDERS, new Statistics(GLOBAL_STATISTICS, GET_ACL_HOLDERS));
+ //Get nodes count
+ ALL_STATISTICS.put(NODES_COUNT, new Statistics(GLOBAL_STATISTICS, NODES_COUNT));
// Write Methods
// Commit
ALL_STATISTICS.put(COMMIT_DESCR, new Statistics(GLOBAL_STATISTICS, COMMIT_DESCR));
@@ -689,4 +693,21 @@
s.end();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getNodesCount() throws RepositoryException
+ {
+ Statistics s = ALL_STATISTICS.get(NODES_COUNT);
+ try
+ {
+ s.begin();
+ return wcs.getNodesCount();
+ }
+ finally
+ {
+ s.end();
+ }
+ }
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -419,4 +419,14 @@
* if operation is not supported
*/
List<ACLHolder> getACLHolders() throws RepositoryException, IllegalStateException, UnsupportedOperationException;
+
+ /**
+ * Reads count of nodes in workspace.
+ *
+ * @return
+ * nodes count
+ * @throws RepositoryException
+ * if a database access error occurs
+ */
+ public long getNodesCount() throws RepositoryException;
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/BaseStandaloneTest.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/BaseStandaloneTest.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/BaseStandaloneTest.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -766,6 +766,14 @@
return false;
}
+ /**
+ * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getNodesCount()
+ */
+ public long getNodesCount() throws RepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
}
}
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -622,6 +622,13 @@
return null;
}
+ /**
+ * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getNodesCount()
+ */
+ public long getNodesCount() throws RepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
};
private static class MyWorkspaceDataContainer extends WorkspaceDataContainerBase
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestWorkspaceStorageCacheInClusterMode.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestWorkspaceStorageCacheInClusterMode.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestWorkspaceStorageCacheInClusterMode.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -968,6 +968,14 @@
{
return null;
}
+
+ /**
+ * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getNodesCount()
+ */
+ public long getNodesCount() throws RepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
};
private static class MyWorkspaceDataContainer extends WorkspaceDataContainerBase
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java 2012-01-31 10:48:05 UTC (rev 5543)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java 2012-01-31 14:11:05 UTC (rev 5544)
@@ -169,7 +169,6 @@
private static class MyWorkspaceStorageConnection implements WorkspaceStorageConnection
{
-
private Mode mode;
private CountDownLatch goSignal;
@@ -333,6 +332,14 @@
return null;
}
+ /**
+ * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getNodesCount()
+ */
+ public long getNodesCount() throws RepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
};
private static class MyWorkspaceDataContainer extends WorkspaceDataContainerBase
12 years, 2 months
exo-jcr SVN: r5543 - in kernel/branches/2.2.x/patch: 2.2.12-GA and 1 other directories.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2012-01-31 05:48:05 -0500 (Tue, 31 Jan 2012)
New Revision: 5543
Added:
kernel/branches/2.2.x/patch/2.2.12-GA/
kernel/branches/2.2.x/patch/2.2.12-GA/KER-181/
kernel/branches/2.2.x/patch/2.2.12-GA/KER-181/KER-181.patch
Log:
KER-181: patch proposed
Added: kernel/branches/2.2.x/patch/2.2.12-GA/KER-181/KER-181.patch
===================================================================
--- kernel/branches/2.2.x/patch/2.2.12-GA/KER-181/KER-181.patch (rev 0)
+++ kernel/branches/2.2.x/patch/2.2.12-GA/KER-181/KER-181.patch 2012-01-31 10:48:05 UTC (rev 5543)
@@ -0,0 +1,110 @@
+Index: exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java
+===================================================================
+--- exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java (revision 5542)
++++ exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java (working copy)
+@@ -161,6 +161,36 @@
+ assertNull(PortalContainer.getCurrentSetting("boolean"));
+ }
+
++ public void testGetConfigurationXML()
++ {
++ URL rootURL = getClass().getResource("test-exo-container.xml");
++ URL portalURL = getClass().getResource("/conf/test-configuration.xml");
++ assertNotNull(rootURL);
++ assertNotNull(portalURL);
++ //
++ new ContainerBuilder().withRoot(rootURL).withPortal(portalURL).build();
++
++ String configXML = RootContainer.getInstance().getConfigurationXML();
++ assertNotNull(configXML);
++ int size = configXML.length();
++ int hash = configXML.hashCode();
++ configXML = RootContainer.getInstance().getConfigurationXML();
++ assertNotNull(configXML);
++ assertTrue(size > 0);
++ assertEquals(size, configXML.length());
++ assertEquals(hash, configXML.hashCode());
++
++ configXML = PortalContainer.getInstance().getConfigurationXML();
++ assertNotNull(configXML);
++ assertTrue(size > 0);
++ size = configXML.length();
++ hash = configXML.hashCode();
++ configXML = PortalContainer.getInstance().getConfigurationXML();
++ assertNotNull(configXML);
++ assertEquals(size, configXML.length());
++ assertEquals(hash, configXML.hashCode());
++ }
++
+ public static class MyComponent
+ {
+ private final InitParams params;
+Index: exo.kernel.container/src/main/java/org/exoplatform/container/xml/Configuration.java
+===================================================================
+--- exo.kernel.container/src/main/java/org/exoplatform/container/xml/Configuration.java (revision 5542)
++++ exo.kernel.container/src/main/java/org/exoplatform/container/xml/Configuration.java (working copy)
+@@ -257,16 +257,8 @@
+ }
+ else if (result == null)
+ {
+- try
+- {
+- // Initialize with the clone of the first non null configuration
+- result = (Configuration)conf.clone();
+- }
+- catch (CloneNotSupportedException e)
+- {
+- log.warn("Could not clone the configuration", e);
+- break;
+- }
++ // Initialize with the clone of the first non null configuration
++ result = (Configuration)conf.clone();
+ }
+ else
+ {
+@@ -276,8 +268,44 @@
+ }
+ return result;
+ }
+-
++
+ /**
++ * {@inheritDoc}
++ */
++ @SuppressWarnings("unchecked")
++ @Override
++ protected Object clone()
++ {
++ try
++ {
++ Configuration conf = (Configuration)super.clone();
++ conf.component_ = (Map<String, Component>)((HashMap<String, Component>)component_).clone();
++ conf.componentLifecyclePlugin_ =
++ (Map<String, ComponentLifecyclePlugin>)((HashMap<String, ComponentLifecyclePlugin>)componentLifecyclePlugin_)
++ .clone();
++ conf.containerLifecyclePlugin_ =
++ (Map<String, ContainerLifecyclePlugin>)((HashMap<String, ContainerLifecyclePlugin>)containerLifecyclePlugin_)
++ .clone();
++ conf.externalComponentPlugins_ =
++ (Map<String, ExternalComponentPlugins>)((HashMap<String, ExternalComponentPlugins>)externalComponentPlugins_)
++ .clone();
++ if (imports_ != null)
++ {
++ conf.imports_ = (ArrayList<String>)imports_.clone();
++ }
++ if (removeConfiguration_ != null)
++ {
++ conf.removeConfiguration_ = (ArrayList<String>)removeConfiguration_.clone();
++ }
++ return conf;
++ }
++ catch (CloneNotSupportedException e)
++ {
++ throw new AssertionError("Could not clone the configuration");
++ }
++ }
++
++ /**
+ * Dumps the configuration in XML format into the given {@link Writer}
+ */
+ public void toXML(Writer w)
12 years, 2 months
exo-jcr SVN: r5542 - in kernel/trunk/exo.kernel.container/src: test/java/org/exoplatform/container and 1 other directories.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2012-01-31 04:45:37 -0500 (Tue, 31 Jan 2012)
New Revision: 5542
Added:
kernel/trunk/exo.kernel.container/src/test/resources/tsm-excludes.properties
Modified:
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/Configuration.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java
Log:
EXOJCR-1736: PortalContainer.getConfigurationXML() returns duplicated configuration
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/Configuration.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/Configuration.java 2012-01-30 12:34:08 UTC (rev 5541)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/Configuration.java 2012-01-31 09:45:37 UTC (rev 5542)
@@ -257,16 +257,8 @@
}
else if (result == null)
{
- try
- {
- // Initialize with the clone of the first non null configuration
- result = (Configuration)conf.clone();
- }
- catch (CloneNotSupportedException e)
- {
- LOG.warn("Could not clone the configuration", e);
- break;
- }
+ // Initialize with the clone of the first non null configuration
+ result = (Configuration)conf.clone();
}
else
{
@@ -276,6 +268,42 @@
}
return result;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ protected Object clone()
+ {
+ try
+ {
+ Configuration conf = (Configuration)super.clone();
+ conf.component_ = (Map<String, Component>)((HashMap<String, Component>)component_).clone();
+ conf.componentLifecyclePlugin_ =
+ (Map<String, ComponentLifecyclePlugin>)((HashMap<String, ComponentLifecyclePlugin>)componentLifecyclePlugin_)
+ .clone();
+ conf.containerLifecyclePlugin_ =
+ (Map<String, ContainerLifecyclePlugin>)((HashMap<String, ContainerLifecyclePlugin>)containerLifecyclePlugin_)
+ .clone();
+ conf.externalComponentPlugins_ =
+ (Map<String, ExternalComponentPlugins>)((HashMap<String, ExternalComponentPlugins>)externalComponentPlugins_)
+ .clone();
+ if (imports_ != null)
+ {
+ conf.imports_ = (ArrayList<String>)imports_.clone();
+ }
+ if (removeConfiguration_ != null)
+ {
+ conf.removeConfiguration_ = (ArrayList<String>)removeConfiguration_.clone();
+ }
+ return conf;
+ }
+ catch (CloneNotSupportedException e)
+ {
+ throw new AssertionError("Could not clone the configuration");
+ }
+ }
/**
* Dumps the configuration in XML format into the given {@link Writer}
Modified: kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java 2012-01-30 12:34:08 UTC (rev 5541)
+++ kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java 2012-01-31 09:45:37 UTC (rev 5542)
@@ -161,6 +161,36 @@
assertNull(PortalContainer.getCurrentSetting("boolean"));
}
+ public void testGetConfigurationXML()
+ {
+ URL rootURL = getClass().getResource("test-exo-container.xml");
+ URL portalURL = getClass().getResource("/conf/test-configuration.xml");
+ assertNotNull(rootURL);
+ assertNotNull(portalURL);
+ //
+ new ContainerBuilder().withRoot(rootURL).withPortal(portalURL).build();
+
+ String configXML = RootContainer.getInstance().getConfigurationXML();
+ assertNotNull(configXML);
+ int size = configXML.length();
+ int hash = configXML.hashCode();
+ configXML = RootContainer.getInstance().getConfigurationXML();
+ assertNotNull(configXML);
+ assertTrue(size > 0);
+ assertEquals(size, configXML.length());
+ assertEquals(hash, configXML.hashCode());
+
+ configXML = PortalContainer.getInstance().getConfigurationXML();
+ assertNotNull(configXML);
+ assertTrue(size > 0);
+ size = configXML.length();
+ hash = configXML.hashCode();
+ configXML = PortalContainer.getInstance().getConfigurationXML();
+ assertNotNull(configXML);
+ assertEquals(size, configXML.length());
+ assertEquals(hash, configXML.hashCode());
+ }
+
public static class MyComponent
{
private final InitParams params;
Added: kernel/trunk/exo.kernel.container/src/test/resources/tsm-excludes.properties
===================================================================
--- kernel/trunk/exo.kernel.container/src/test/resources/tsm-excludes.properties (rev 0)
+++ kernel/trunk/exo.kernel.container/src/test/resources/tsm-excludes.properties 2012-01-31 09:45:37 UTC (rev 5542)
@@ -0,0 +1 @@
+org.exoplatform.container.TestPortalContainer.testGetConfigurationXML=getConfigurationXML
\ No newline at end of file
12 years, 2 months
exo-jcr SVN: r5541 - jcr/trunk/exo.jcr.component.core.impl.infinispan.v5.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-01-30 07:34:08 -0500 (Mon, 30 Jan 2012)
New Revision: 5541
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml
Log:
EXOJCR-1682 : fix build
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml 2012-01-30 08:34:51 UTC (rev 5540)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml 2012-01-30 12:34:08 UTC (rev 5541)
@@ -77,7 +77,7 @@
<dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.component.core</artifactId>
- <classifier>tests</classifier>
+ <classifier>test-sources</classifier>
<scope>test</scope>
<version>${project.version}</version>
<exclusions>
12 years, 2 months
exo-jcr SVN: r5540 - jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-01-30 03:34:51 -0500 (Mon, 30 Jan 2012)
New Revision: 5540
Modified:
jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml
Log:
EXOJCR-1711 : updating documentation
Modified: jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml
===================================================================
--- jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml 2012-01-28 15:36:17 UTC (rev 5539)
+++ jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml 2012-01-30 08:34:51 UTC (rev 5540)
@@ -412,81 +412,83 @@
</properties>
</query-handler>
</programlisting>
- </section>
- <section>
- <title>Local Index Recover Filters</title>
+ <section>
+ <title>Local Index Recover Filters</title>
- <para>Common usecase for all cluster-ready applications is a hot
- joining and leaving of processing units. Node that is joining cluster
- for the first time or node joining after some downtime, they all must
- be in a synchronized state. When having a deal with shared value
- storages, databases and indexes, cluster nodes are synchronized
- anytime. But it's an issue when local index strategy used. If new node
- joins cluster, having no index it is retrieved or recreated. Node can
- be restarted also and thus index not empty. By default existing index
- is thought to be actual, but can be outdated. JCR offers a mechanism
- called RecoveryFilters that will automatically retrieve index for the
- joining node on startup. This feature is a set of filters that can be
- defined via QueryHandler configuration:</para>
+ <para>Common usecase for all cluster-ready applications is a hot
+ joining and leaving of processing units. Node that is joining
+ cluster for the first time or node joining after some downtime, they
+ all must be in a synchronized state. When having a deal with shared
+ value storages, databases and indexes, cluster nodes are
+ synchronized anytime. But it's an issue when local index strategy
+ used. If new node joins cluster, having no index it is retrieved or
+ recreated. Node can be restarted also and thus index not empty. By
+ default existing index is thought to be actual, but can be outdated.
+ JCR offers a mechanism called RecoveryFilters that will
+ automatically retrieve index for the joining node on startup. This
+ feature is a set of filters that can be defined via QueryHandler
+ configuration:</para>
- <programlisting language="xml"><property name="index-recovery-filter" value="org.exoplatform.services.jcr.impl.core.query.lucene.DocNumberRecoveryFilter" /></programlisting>
+ <programlisting language="xml"><property name="index-recovery-filter" value="org.exoplatform.services.jcr.impl.core.query.lucene.DocNumberRecoveryFilter" /></programlisting>
- <para>Filter number is not limited so they can be combined:</para>
+ <para>Filter number is not limited so they can be combined:</para>
- <programlisting language="xml"><property name="index-recovery-filter" value="org.exoplatform.services.jcr.impl.core.query.lucene.DocNumberRecoveryFilter" />
+ <programlisting language="xml"><property name="index-recovery-filter" value="org.exoplatform.services.jcr.impl.core.query.lucene.DocNumberRecoveryFilter" />
<property name="index-recovery-filter" value="org.exoplatform.services.jcr.impl.core.query.lucene.SystemPropertyRecoveryFilter" />
</programlisting>
- <para>If any one returns fires, the index is re-synchronized. This
- feature uses standard index recovery mode defined by previously
- described parameter (can be "from-indexing" (default) or
- "from-coordinator")</para>
+ <para>If any one returns fires, the index is re-synchronized. This
+ feature uses standard index recovery mode defined by previously
+ described parameter (can be "from-indexing" (default) or
+ "from-coordinator")</para>
- <programlisting language="xml"><property name="index-recovery-mode" value="from-coordinator" />
+ <programlisting language="xml"><property name="index-recovery-mode" value="from-coordinator" />
</programlisting>
- <para>There are couple implementations of filters:</para>
+ <para>There are couple implementations of filters:</para>
- <itemizedlist>
- <listitem>
- <para>org.exoplatform.services.jcr.impl.core.query.lucene.DummyRecoveryFilter:
- always returns true, for cases when index must be force
- resynchronized (recovered) each time;</para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para>org.exoplatform.services.jcr.impl.core.query.lucene.DummyRecoveryFilter:
+ always returns true, for cases when index must be force
+ resynchronized (recovered) each time;</para>
+ </listitem>
- <listitem>
- <para>org.exoplatform.services.jcr.impl.core.query.lucene.SystemPropertyRecoveryFilter
- : return value of system property
- "org.exoplatform.jcr.recoveryfilter.forcereindexing". So index
- recovery can be controlled from the top without changing
- documentation using system properties;</para>
- </listitem>
+ <listitem>
+ <para>org.exoplatform.services.jcr.impl.core.query.lucene.SystemPropertyRecoveryFilter
+ : return value of system property
+ "org.exoplatform.jcr.recoveryfilter.forcereindexing". So index
+ recovery can be controlled from the top without changing
+ documentation using system properties;</para>
+ </listitem>
- <listitem>
- <para>org.exoplatform.services.jcr.impl.core.query.lucene.ConfigurationPropertyRecoveryFilter
- : return value of QueryHandler configuration property
- "index-recovery-filter-forcereindexing". So index recovery can be
- controlled from configuration separately for each workspace.
- I.e:</para>
+ <listitem>
+ <para>org.exoplatform.services.jcr.impl.core.query.lucene.ConfigurationPropertyRecoveryFilter
+ : return value of QueryHandler configuration property
+ "index-recovery-filter-forcereindexing". So index recovery can
+ be controlled from configuration separately for each workspace.
+ I.e:</para>
- <programlisting language="xml"><property name="index-recovery-filter" value="org.exoplatform.services.jcr.impl.core.query.lucene.ConfigurationPropertyRecoveryFilter" />
+ <programlisting language="xml"><property name="index-recovery-filter" value="org.exoplatform.services.jcr.impl.core.query.lucene.ConfigurationPropertyRecoveryFilter" />
<property name="index-recovery-filter-forcereindexing" value="true" />
</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>org.exoplatform.services.jcr.impl.core.query.lucene.DocNumberRecoveryFilter
- : checks number of documents in index on coordinator side and
- self-side. Return true if differs. Advantage of this filter
- comparing to other, it will skip reindexing for workspaces where
- index wasn't modified. I.e. there is 10 repositories with 3
- workspaces in each one. Only one is really heavily used in cluster
- : frontend/production. So using this filter will only reindex
- those workspaces that are really changed, without affecting other
- indexes thus greatly reducing startup time.</para>
- </listitem>
- </itemizedlist>
+ <listitem>
+ <para>org.exoplatform.services.jcr.impl.core.query.lucene.DocNumberRecoveryFilter
+ : checks number of documents in index on coordinator side and
+ self-side. Return true if differs. Advantage of this filter
+ comparing to other, it will skip reindexing for workspaces where
+ index wasn't modified. I.e. there is 10 repositories with 3
+ workspaces in each one. Only one is really heavily used in
+ cluster : frontend/production. So using this filter will only
+ reindex those workspaces that are really changed, without
+ affecting other indexes thus greatly reducing startup
+ time.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
</section>
12 years, 3 months
exo-jcr SVN: r5539 - in jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main: resources/images and 1 other directory.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-01-28 10:36:17 -0500 (Sat, 28 Jan 2012)
New Revision: 5539
Added:
jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-rsync-index.png
Modified:
jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml
jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-source.svg
Log:
EXOJCR-1711 : updatind documentation
Modified: jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml
===================================================================
--- jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml 2012-01-28 08:45:35 UTC (rev 5538)
+++ jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/query-handler-config.xml 2012-01-28 15:36:17 UTC (rev 5539)
@@ -16,8 +16,8 @@
has several limitations that greatly reduce possibilities and limits the
usage of cluster advantages. That's why eXo JCR offers three strategies
that are suitable for it's own usecases. They are standalone, clustered
- with shared index and clustered with local indexes. Each one has it's pros
- and cons.</para>
+ with shared index, clustered with local indexes and RSync-based. Each one
+ has it's pros and cons.</para>
<para>Stanadlone strategy provides a stack of indexes to achieve greater
performance within single JVM.</para>
@@ -81,6 +81,26 @@
indexes within cluster instances for a while. In a few seconds they will
be up2date.</para>
+ <para>Shared index is consistent and stable enough, but slow, while local
+ index is fast, but requires much time for re-synchronization, when cluster
+ node is leaving a cluster for a small period of time. RSync-based index
+ solves this problem along with local file system advantages in term of
+ speed. </para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" fileref="images/diagram-rsync-index.png" />
+ </imageobject>
+ </mediaobject>
+
+ <para>This strategy is the same shared index, but stores actual data on
+ local file system, instead of shared. Eventually triggering a
+ synchronization job, that woks on the level of file blocks, synchronizing
+ only modified data. Diagram shows it in action. Only single node in the
+ cluster is responsible for modifying index files, this is the Coordinator
+ node. When data persisted, corresponding command fired, starting
+ synchronization jobs all over the cluster.</para>
+
<para>See more about <link linkend="JCR.SearchConfiguration">Search
Configuration</link>.</para>
</section>
@@ -243,76 +263,160 @@
and all the "jbosscache-*" must be skipped and not defined. Like the
configuration below.</para>
- <programlisting language="xml"><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="max-volatile-time" value="60" />
- <property name="rdbms-reindexing" value="true" />
- <property name="reindexing-page-size" value="1000" />
- <property name="index-recovery-mode" value="from-coordinator" />
- </properties>
- </query-handler>
-</workspace></programlisting>
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="shareddir/index/db1/ws" />
+ <property name="max-volatile-time" value="60" />
+ <property name="rdbms-reindexing" value="true" />
+ <property name="reindexing-page-size" value="1000" />
+ <property name="index-recovery-mode" value="from-coordinator" />
+ </properties>
+</query-handler>
+</programlisting>
</section>
<section>
<title>Cluster-ready indexing strategies</title>
- <para>For both cluster-ready implementations JBoss Cache, JGroups and
- Changes Filter values must be defined. Shared index requires some kind
- of remote or shared file system to be attached in a system (i.e. NFS,
- SMB or etc). Indexing directory ("indexDir" value) must point to it.
- Setting "changesfilter-class" to
- "org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"
- will enable shared index implementation.</para>
+ <section>
+ <title>Shared Index</title>
- <programlisting language="xml"><workspace name="ws">
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="/mnt/nfs_drive/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" />
- <property name="rdbms-reindexing" value="true" />
- <property name="reindexing-page-size" value="1000" />
- <property name="index-recovery-mode" value="from-coordinator" />
- </properties>
- </query-handler>
-</workspace></programlisting>
+ <para>For both cluster-ready implementations JBoss Cache, JGroups and
+ Changes Filter values must be defined. Shared index requires some kind
+ of remote or shared file system to be attached in a system (i.e. NFS,
+ SMB or etc). Indexing directory ("indexDir" value) must point to it.
+ Setting "changesfilter-class" to
+ "org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"
+ will enable shared index implementation.</para>
- <para>In order to use cluster-ready strategy based on local indexes,
- when each node has own copy of index on local file system, the following
- configuration must be applied. Indexing directory must point to any
- folder on local file system and "changesfilter-class" must be set to
- "org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter".</para>
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="/mnt/nfs_drive/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" />
+ <property name="rdbms-reindexing" value="true" />
+ <property name="reindexing-page-size" value="1000" />
+ <property name="index-recovery-mode" value="from-coordinator" />
+ </properties>
+</query-handler>
+</programlisting>
+ </section>
- <programlisting language="xml"><workspace name="ws">
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="/mnt/nfs_drive/index/db1/ws" />
- <property name="changesfilter-class"
- value="org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter" />
- <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" />
- <property name="rdbms-reindexing" value="true" />
- <property name="reindexing-page-size" value="1000" />
- <property name="index-recovery-mode" value="from-coordinator" />
- </properties>
- </query-handler>
-</workspace>
+ <section>
+ <title>RSync Index</title>
+
+ <section>
+ <title>System requirements</title>
+
+ <para>Mandatory requirement for Rsync-based indexing strategy is an
+ installed and properly configured RSync utility. It must be
+ accessible by calling "rsync" without defining it's full path, in
+ addition each cluster node should have a running RSync Server
+ supporting "rsync://" protocol. For more details, please refer to
+ RSync and operation system documentations. Sample RSync Server
+ configuration will be shown below. There are some additional
+ limitations also. Path for index for each workspace must be the same
+ across the cluster, i.e.
+ "/var/data/index/<repository-name>/<workspace-name>".
+ Next limitation is RSync Server configuration. It must share some of
+ index's parent folders. For example, "/var/data/index". In other
+ words, index is stored inside of RSync Server shared folder.
+ Configuration details are give below.</para>
+ </section>
+
+ <section>
+ <title>Configuration</title>
+
+ <para>Configuration has much in common with Shared Index, it just
+ requires some additional parameters for RSync options. If they are
+ present, JCR switches from shared to RSync-based index. Here is an
+ example configuration:</para>
+
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="/var/data/index/repository1/production" />
+ <property name="changesfilter-class"
+ value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
+ <property name="jbosscache-configuration" value="jar:/conf/portal/cluster/jbosscache-indexer.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="jgroups-multiplexer-stack" value="false" />
+ <property name="jbosscache-cluster-name" value="JCR-cluster-indexer" />
+ <property name="jbosscache-shareable" value="true" />
+ <property name="max-volatile-time" value="60" />
+ <property name="rsync-entry-name" value="index" />
+ <property name="rsync-entry-path" value="/var/data/index" />
+ <property name="rsync-port" value="8085" />
+ <property name="rsync-user" value="rsyncexo" />
+ <property name="rsync-password" value="exo" />
+ </properties>
+</query-handler>
</programlisting>
+ <para>Let's start with authentication: "rsync-user" and
+ "rsync-password". They are optional and can be skipped if RSync
+ Server configured to accept anonymous identity. Before reviewing
+ other RSync index options need to have a look at RSync Server
+ configuration. Sample RSync Server (rsyncd) Configuration </para>
+
+ <programlisting>uid = nobody
+gid = nobody
+use chroot = no
+port = 8085
+log file = rsyncd.log
+pid file = rsyncd.pid
+[index]
+ path = /var/data/index
+ comment = indexes
+ read only = true
+ auth users = rsyncexo
+ secrets file= rsyncd.secrets
+</programlisting>
+
+ <para>This sample configuration shares folder "/var/data/index" as
+ an entry "index". Those parameters should match corresponding
+ properties in JCR configuration. Respectively "rsync-entry-name",
+ "rsync-entry-path", "rsync-port" properties. Notice! Make sure
+ "index-dir" is a descendant folder of RSync shared folder and those
+ paths are the same on each cluster node.</para>
+ </section>
+ </section>
+
<section>
- <title>Local Index Recovery Filters</title>
+ <title>Local Index</title>
+ <para>In order to use cluster-ready strategy based on local indexes,
+ when each node has own copy of index on local file system, the
+ following configuration must be applied. Indexing directory must point
+ to any folder on local file system and "changesfilter-class" must be
+ set to
+ "org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter".</para>
+
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="/mnt/nfs_drive/index/db1/ws" />
+ <property name="changesfilter-class"
+ value="org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter" />
+ <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" />
+ <property name="rdbms-reindexing" value="true" />
+ <property name="reindexing-page-size" value="1000" />
+ <property name="index-recovery-mode" value="from-coordinator" />
+ </properties>
+</query-handler>
+</programlisting>
+ </section>
+
+ <section>
+ <title>Local Index Recover Filters</title>
+
<para>Common usecase for all cluster-ready applications is a hot
joining and leaving of processing units. Node that is joining cluster
for the first time or node joining after some downtime, they all must
@@ -460,11 +564,11 @@
<para>"OFFLINE" state means that index is currently re-creating. When
state changed, corresponding log event is printed. From the start of
background task index is switched to "OFFLINE", with following log event
- : </para>
+ :</para>
<programlisting>[INFO] Setting index OFFLINE (repository/production[system]).</programlisting>
- <para>When process finished, two events are logged : </para>
+ <para>When process finished, two events are logged :</para>
<programlisting>[INFO] Created initial index for 143018 nodes (repository/production[system]).
[INFO] Setting index ONLINE (repository/production[system]).</programlisting>
Added: jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-rsync-index.png
===================================================================
(Binary files differ)
Property changes on: jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-rsync-index.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-source.svg
===================================================================
--- jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-source.svg 2012-01-28 08:45:35 UTC (rev 5538)
+++ jcr/branches/1.14-RSYNC/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-source.svg 2012-01-28 15:36:17 UTC (rev 5539)
@@ -14,7 +14,7 @@
height="1180"
id="svg2"
version="1.1"
- inkscape:version="0.48.0 r9654"
+ inkscape:version="0.48.2 r9819"
sodipodi:docname="diagram-source.svg"
inkscape:export-filename="/home/nikolaz/Desktop/cluster.png"
inkscape:export-xdpi="90"
@@ -1341,6 +1341,195 @@
y1="378.4386"
x2="167.42206"
y2="378.4386" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590-0"
+ id="radialGradient5198"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.49287173,-1.4585165e-7,2.4715537e-8,0.08114378,-1050.957,435.79549)"
+ cx="172.86125"
+ cy="30.079779"
+ fx="172.86125"
+ fy="30.079779"
+ r="114.28571" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590-0"
+ id="radialGradient5204"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.49287173,-1.4585165e-7,2.4715537e-8,0.08114378,-1050.957,435.79549)"
+ cx="172.86125"
+ cy="30.079779"
+ fx="172.86125"
+ fy="30.079779"
+ r="114.28571" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590-0"
+ id="radialGradient5210"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.49287173,-1.4585165e-7,2.4715537e-8,0.08114378,-1050.957,435.79549)"
+ cx="172.86125"
+ cy="30.079779"
+ fx="172.86125"
+ fy="30.079779"
+ r="114.28571" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590-0"
+ id="radialGradient5336"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.3012875,-4.386106e-7,1.8785129e-7,0.48024927,351.6568,2319.6804)"
+ cx="192.30554"
+ cy="128.54347"
+ fx="192.30554"
+ fy="128.54347"
+ r="114.28571" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4019"
+ id="radialGradient5339"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.3012875,-4.386106e-7,1.8785129e-7,0.48024927,351.6568,2319.6804)"
+ cx="192.30554"
+ cy="128.54347"
+ fx="192.30554"
+ fy="128.54347"
+ r="114.28571" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590-0"
+ id="radialGradient5349"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.3012875,-4.386106e-7,1.8785129e-7,0.48024927,-128.3432,2319.6804)"
+ cx="192.30554"
+ cy="128.54347"
+ fx="192.30554"
+ fy="128.54347"
+ r="114.28571" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4019"
+ id="radialGradient5352"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.3012875,-4.386106e-7,1.8785129e-7,0.48024927,-128.3432,2319.6804)"
+ cx="192.30554"
+ cy="128.54347"
+ fx="192.30554"
+ fy="128.54347"
+ r="114.28571" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4019"
+ id="radialGradient5403"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.3012875,-4.386106e-7,1.8785129e-7,0.48024927,71.6568,2319.6804)"
+ cx="192.30554"
+ cy="128.54347"
+ fx="192.30554"
+ fy="128.54347"
+ r="114.28571" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4019"
+ id="radialGradient5411"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.3012875,-4.386106e-7,1.8785129e-7,0.48024927,71.6568,2319.6804)"
+ cx="192.30554"
+ cy="128.54347"
+ fx="192.30554"
+ fy="128.54347"
+ r="114.28571" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590"
+ id="linearGradient5521"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1052.2075,-146.87721)"
+ x1="71.50563"
+ y1="369.29129"
+ x2="167.36424"
+ y2="369.29129" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590"
+ id="linearGradient5523"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1052.2075,-146.87721)"
+ x1="71.50563"
+ y1="394.31128"
+ x2="130.18889"
+ y2="394.31128" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3679"
+ id="linearGradient5525"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1052.2075,-146.87721)"
+ x1="130.10934"
+ y1="378.4386"
+ x2="167.42206"
+ y2="378.4386" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590"
+ id="linearGradient5527"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1052.2075,-146.87721)"
+ x1="71.50563"
+ y1="369.29129"
+ x2="167.36424"
+ y2="369.29129" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590"
+ id="linearGradient5529"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1052.2075,-146.87721)"
+ x1="71.50563"
+ y1="394.31128"
+ x2="130.18889"
+ y2="394.31128" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3679"
+ id="linearGradient5531"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1052.2075,-146.87721)"
+ x1="130.10934"
+ y1="378.4386"
+ x2="167.42206"
+ y2="378.4386" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590"
+ id="linearGradient5533"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1052.2075,-146.87721)"
+ x1="71.50563"
+ y1="369.29129"
+ x2="167.36424"
+ y2="369.29129" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3590"
+ id="linearGradient5535"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1052.2075,-146.87721)"
+ x1="71.50563"
+ y1="394.31128"
+ x2="130.18889"
+ y2="394.31128" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3679"
+ id="linearGradient5537"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-1052.2075,-146.87721)"
+ x1="130.10934"
+ y1="378.4386"
+ x2="167.42206"
+ y2="378.4386" />
</defs>
<sodipodi:namedview
id="base"
@@ -1349,16 +1538,16 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="0.7071068"
- inkscape:cx="443.18636"
- inkscape:cy="-987.03691"
+ inkscape:zoom="1"
+ inkscape:cx="417.80412"
+ inkscape:cy="-1179.0227"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1680"
- inkscape:window-height="1000"
+ inkscape:window-height="1026"
inkscape:window-x="0"
- inkscape:window-y="25"
+ inkscape:window-y="24"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true"
@@ -4282,5 +4471,752 @@
y="1970.5767"
style="font-size:15px;text-align:center;text-anchor:middle">index</tspan></text>
</g>
+ <g
+ id="g7360"
+ inkscape:export-filename="/home/exo/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-rsync-index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <rect
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ id="rect5006"
+ width="163.92166"
+ height="89.972282"
+ x="239.94072"
+ y="2326.5276"
+ rx="7"
+ ry="7"
+ style="fill:url(#radialGradient5411);fill-opacity:1;stroke:#000000;stroke-opacity:1;filter:url(#filter5884)" />
+ <g
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ id="g5008"
+ transform="matrix(0.48339876,0,0,2.5152896,219.4854,1497.8277)"
+ style="opacity:0.26200873">
+ <path
+ inkscape:connector-curvature="0"
+ style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:15;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Andale Mono;-inkscape-font-specification:Andale Mono"
+ d="m -74.25,344.8125 0,15 730.4375,0 0,-15 -730.4375,0 z"
+ id="path5010" />
+ </g>
+ <rect
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ style="fill:url(#radialGradient5403);fill-opacity:1"
+ ry="7"
+ rx="7"
+ y="2326.5276"
+ x="239.94072"
+ height="89.972282"
+ width="163.92166"
+ id="rect5018" />
+ <text
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ id="text5020"
+ y="2392.8604"
+ x="257.58612"
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ y="2392.8604"
+ x="257.58612"
+ id="tspan5022"
+ sodipodi:role="line">JCR #2</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ id="text5024"
+ y="2431.8838"
+ x="314.95868"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
+ sodipodi:role="line"
+ id="tspan5026"
+ x="314.95868"
+ y="2431.8838"
+ style="font-size:15px">coordinator</tspan></text>
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:url(#Arrow1Mend)"
+ d="m 383.67405,2319.4401 c -0.462,-34.8901 -0.0914,-19.4649 -0.57286,-55.734"
+ id="path5028"
+ sodipodi:nodetypes="cs"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 8;stroke-dashoffset:0;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:none"
+ d="m 147.86249,2194.8527 c 33.42131,-0.4928 137.32092,-1.0597 152.90911,-0.5649"
+ id="path5030"
+ sodipodi:nodetypes="cs"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <text
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="213.55304"
+ y="2159.1682"
+ id="text5034"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
+ sodipodi:role="line"
+ x="213.55304"
+ y="2159.1682"
+ id="tspan5036"
+ style="font-size:30px">RSync-based index</tspan></text>
+ <text
+ sodipodi:linespacing="80.000001%"
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle;opacity:0.39738045;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ id="text5038"
+ y="2388.5635"
+ x="462.73706"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
+ id="tspan5040"
+ sodipodi:role="line"
+ x="462.73706"
+ y="2388.5635"
+ style="font-size:15px;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle">JBoss Cache</tspan></text>
+ <path
+ inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ sodipodi:nodetypes="cc"
+ id="path5078"
+ d="m 515.26014,2369.7686 -107.51944,0"
+ style="opacity:0.59825332;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Lstart-53)" />
+ <path
+ inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ sodipodi:nodetypes="cc"
+ id="path5080"
+ d="m 407.7407,2397.6889 107.44101,0"
+ style="opacity:0.59825332;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Lstart-53)" />
+ <g
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ transform="translate(1277.846,1905.8061)"
+ id="g5082">
+ <rect
+ id="rect5084"
+ width="135.1803"
+ height="17.132936"
+ x="-1022.2118"
+ y="428.96268"
+ rx="4"
+ ry="4"
+ style="fill:#000000;fill-opacity:1;filter:url(#filter6060)" />
+ <rect
+ style="fill:url(#radialGradient5198);fill-opacity:1"
+ ry="4"
+ rx="4"
+ y="428.96268"
+ x="-1022.2118"
+ height="17.132936"
+ width="135.1803"
+ id="rect5086" />
+ <text
+ id="text5088"
+ y="442.27301"
+ x="-1004.0707"
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ style="font-size:15px"
+ y="442.27301"
+ x="-1004.0707"
+ id="tspan5090"
+ sodipodi:role="line">Volatile index</tspan></text>
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ id="text5092"
+ y="2362.3901"
+ x="496.50299"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
+ id="tspan5094"
+ sodipodi:role="line"
+ x="496.50299"
+ y="2362.3901"
+ style="font-size:10px;text-align:end;text-anchor:end">list of indexes</tspan></text>
+ <text
+ sodipodi:linespacing="80.000001%"
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ id="text5096"
+ y="2412.8521"
+ x="461.1297"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
+ id="tspan5098"
+ sodipodi:role="line"
+ x="461.1297"
+ y="2412.8521"
+ style="font-size:10px;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle">list of new/updated</tspan><tspan
+ id="tspan5100"
+ sodipodi:role="line"
+ x="461.1297"
+ y="2420.8521"
+ style="font-size:10px;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle">content</tspan></text>
+ <text
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ x="375.82294"
+ y="2287.1191"
+ id="text5102"
+ style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ id="tspan5104"
+ style="font-size:15px;text-align:end;text-anchor:end"
+ y="2287.1191"
+ x="380.59833"
+ sodipodi:role="line">flush </tspan><tspan
+ id="tspan5106"
+ style="font-size:15px;text-align:end;text-anchor:end"
+ y="2305.8691"
+ x="375.82294"
+ sodipodi:role="line">volatile index</tspan></text>
+ <path
+ inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ style="opacity:0.59825332;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Lstart-53)"
+ d="m 207.981,2369.7686 26.8308,0"
+ id="path5114"
+ sodipodi:nodetypes="cc" />
+ <rect
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ id="rect5116"
+ width="163.92166"
+ height="89.972282"
+ x="39.94072"
+ y="2326.5276"
+ rx="7"
+ ry="7"
+ style="fill:url(#radialGradient5352);fill-opacity:1;stroke:#000000;stroke-opacity:1;filter:url(#filter5884)" />
+ <rect
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ style="fill:url(#radialGradient5349);fill-opacity:1"
+ ry="7"
+ rx="7"
+ y="2326.5276"
+ x="39.94072"
+ height="89.972282"
+ width="163.92166"
+ id="rect5118" />
+ <text
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ id="text5120"
+ y="2392.8604"
+ x="57.586121"
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ y="2392.8604"
+ x="57.586121"
+ id="tspan5122"
+ sodipodi:role="line">JCR #1</tspan></text>
+ <g
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ transform="translate(1077.846,1905.8061)"
+ id="g5124">
+ <rect
+ id="rect5126"
+ width="135.1803"
+ height="17.132936"
+ x="-1022.2118"
+ y="428.96268"
+ rx="4"
+ ry="4"
+ style="fill:#000000;fill-opacity:1;filter:url(#filter6060)" />
+ <rect
+ style="fill:url(#radialGradient5204);fill-opacity:1"
+ ry="4"
+ rx="4"
+ y="428.96268"
+ x="-1022.2118"
+ height="17.132936"
+ width="135.1803"
+ id="rect5128" />
+ <text
+ id="text5130"
+ y="442.27301"
+ x="-1004.0707"
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ style="font-size:15px"
+ y="442.27301"
+ x="-1004.0707"
+ id="tspan5132"
+ sodipodi:role="line">Volatile index</tspan></text>
+ </g>
+ <rect
+ style="fill:url(#radialGradient5339);fill-opacity:1;stroke:#000000;stroke-opacity:1;filter:url(#filter5884)"
+ ry="7"
+ rx="7"
+ y="2326.5276"
+ x="519.94073"
+ height="89.972282"
+ width="163.92166"
+ id="rect5134"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <rect
+ id="rect5136"
+ width="163.92166"
+ height="89.972282"
+ x="519.94073"
+ y="2326.5276"
+ rx="7"
+ ry="7"
+ style="fill:url(#radialGradient5336);fill-opacity:1"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="537.58612"
+ y="2392.8604"
+ id="text5138"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
+ sodipodi:role="line"
+ id="tspan5140"
+ x="537.58612"
+ y="2392.8604">JCR #n</tspan></text>
+ <g
+ id="g5142"
+ transform="translate(1557.846,1905.8061)"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <rect
+ style="fill:#000000;fill-opacity:1;filter:url(#filter6060)"
+ ry="4"
+ rx="4"
+ y="428.96268"
+ x="-1022.2118"
+ height="17.132936"
+ width="135.1803"
+ id="rect5144" />
+ <rect
+ id="rect5146"
+ width="135.1803"
+ height="17.132936"
+ x="-1022.2118"
+ y="428.96268"
+ rx="4"
+ ry="4"
+ style="fill:url(#radialGradient5210);fill-opacity:1" />
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="-1004.0707"
+ y="442.27301"
+ id="text5148"><tspan
+ sodipodi:role="line"
+ id="tspan5150"
+ x="-1004.0707"
+ y="442.27301"
+ style="font-size:15px">Volatile index</tspan></text>
+ </g>
+ <text
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ sodipodi:linespacing="80.000001%"
+ x="349.88257"
+ y="2237.4382"
+ id="text5413"
+ style="font-size:20px;font-style:normal;font-weight:normal;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ style="font-size:20px;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle"
+ y="2237.4382"
+ x="349.88257"
+ id="tspan5415"
+ sodipodi:role="line">local</tspan><tspan
+ id="tspan5417"
+ style="font-size:20px;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle"
+ y="2253.4382"
+ x="349.88257"
+ sodipodi:role="line">file system</tspan></text>
+ <g
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ transform="translate(1283.846,2027.8061)"
+ id="g5419">
+ <g
+ style="fill:#000000;fill-opacity:1;filter:url(#filter3958)"
+ id="g5421">
+ <path
+ id="path5423"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -927.54545,153.32625 -46.3903,25.73628 -0.0692,-8.28635 46.40736,-23.6939 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5425"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -0.0561,-6.71388 -45.32037,-4.9837 0.0522,6.24397 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5427"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -56.91756,-10.05543 46.3903,-25.73628 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5429"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.27725,152.06598 -34.81726,27.91714 -56.91047,-9.20694 46.40736,-23.6939 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5431"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -917.01819,189.11796 -0.0763,-9.13484 -56.91047,-9.20694 0.0692,8.28635 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5433"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -0.0763,-9.13484 34.81726,-27.91714 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ style="fill:none"
+ id="g5435">
+ <path
+ id="path5437"
+ style="fill:#e9e9ff;fill-rule:evenodd;stroke:none"
+ d="m -927.54545,153.32625 -46.3903,25.73628 -0.0692,-8.28635 46.40736,-23.6939 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5439"
+ style="fill:#353564;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -0.0561,-6.71388 -45.32037,-4.9837 0.0522,6.24397 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5441"
+ style="fill:#4d4d9f;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -56.91756,-10.05543 46.3903,-25.73628 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5443"
+ style="fill:url(#linearGradient5521);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.27725,152.06598 -34.81726,27.91714 -56.91047,-9.20694 46.40736,-23.6939 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5445"
+ style="fill:url(#linearGradient5523);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -917.01819,189.11796 -0.0763,-9.13484 -56.91047,-9.20694 0.0692,8.28635 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5447"
+ style="fill:url(#linearGradient5525);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -0.0763,-9.13484 34.81726,-27.91714 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-size:20px;font-style:normal;font-weight:normal;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ id="text5449"
+ y="2237.4382"
+ x="91.882568"
+ sodipodi:linespacing="80.000001%"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
+ sodipodi:role="line"
+ id="tspan5451"
+ x="91.882568"
+ y="2237.4382"
+ style="font-size:20px;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle">local</tspan><tspan
+ sodipodi:role="line"
+ x="91.882568"
+ y="2253.4382"
+ style="font-size:20px;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle"
+ id="tspan5453">file system</tspan></text>
+ <g
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ id="g5455"
+ transform="translate(1025.846,2027.8061)">
+ <g
+ id="g5457"
+ style="fill:#000000;fill-opacity:1;filter:url(#filter3958)">
+ <path
+ inkscape:connector-curvature="0"
+ d="m -927.54545,153.32625 -46.3903,25.73628 -0.0692,-8.28635 46.40736,-23.6939 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path5459" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -882.22116,158.77986 -0.0561,-6.71388 -45.32037,-4.9837 0.0522,6.24397 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path5461" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -56.91756,-10.05543 46.3903,-25.73628 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path5463" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -882.27725,152.06598 -34.81726,27.91714 -56.91047,-9.20694 46.40736,-23.6939 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path5465" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -917.01819,189.11796 -0.0763,-9.13484 -56.91047,-9.20694 0.0692,8.28635 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path5467" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -0.0763,-9.13484 34.81726,-27.91714 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path5469" />
+ </g>
+ <g
+ id="g5471"
+ style="fill:none">
+ <path
+ inkscape:connector-curvature="0"
+ d="m -927.54545,153.32625 -46.3903,25.73628 -0.0692,-8.28635 46.40736,-23.6939 z"
+ style="fill:#e9e9ff;fill-rule:evenodd;stroke:none"
+ id="path5473" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -882.22116,158.77986 -0.0561,-6.71388 -45.32037,-4.9837 0.0522,6.24397 z"
+ style="fill:#353564;fill-rule:evenodd;stroke:none"
+ id="path5475" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -56.91756,-10.05543 46.3903,-25.73628 z"
+ style="fill:#4d4d9f;fill-rule:evenodd;stroke:none"
+ id="path5477" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -882.27725,152.06598 -34.81726,27.91714 -56.91047,-9.20694 46.40736,-23.6939 z"
+ style="fill:url(#linearGradient5527);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path5479" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -917.01819,189.11796 -0.0763,-9.13484 -56.91047,-9.20694 0.0692,8.28635 z"
+ style="fill:url(#linearGradient5529);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path5481" />
+ <path
+ inkscape:connector-curvature="0"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -0.0763,-9.13484 34.81726,-27.91714 z"
+ style="fill:url(#linearGradient5531);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path5483" />
+ </g>
+ </g>
+ <text
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ sodipodi:linespacing="80.000001%"
+ x="631.88257"
+ y="2237.4382"
+ id="text5485"
+ style="font-size:20px;font-style:normal;font-weight:normal;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ style="font-size:20px;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle"
+ y="2237.4382"
+ x="631.88257"
+ id="tspan5487"
+ sodipodi:role="line">local</tspan><tspan
+ id="tspan5489"
+ style="font-size:20px;text-align:center;line-height:80.00000119%;writing-mode:lr-tb;text-anchor:middle"
+ y="2253.4382"
+ x="631.88257"
+ sodipodi:role="line">file system</tspan></text>
+ <g
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/java/jboss/jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/diagram-local-index.png"
+ transform="translate(1565.846,2027.8061)"
+ id="g5491">
+ <g
+ style="fill:#000000;fill-opacity:1;filter:url(#filter3958)"
+ id="g5493">
+ <path
+ id="path5495"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -927.54545,153.32625 -46.3903,25.73628 -0.0692,-8.28635 46.40736,-23.6939 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5497"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -0.0561,-6.71388 -45.32037,-4.9837 0.0522,6.24397 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5499"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -56.91756,-10.05543 46.3903,-25.73628 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5501"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.27725,152.06598 -34.81726,27.91714 -56.91047,-9.20694 46.40736,-23.6939 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5503"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -917.01819,189.11796 -0.0763,-9.13484 -56.91047,-9.20694 0.0692,8.28635 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5505"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -0.0763,-9.13484 34.81726,-27.91714 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ style="fill:none"
+ id="g5507">
+ <path
+ id="path5509"
+ style="fill:#e9e9ff;fill-rule:evenodd;stroke:none"
+ d="m -927.54545,153.32625 -46.3903,25.73628 -0.0692,-8.28635 46.40736,-23.6939 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5511"
+ style="fill:#353564;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -0.0561,-6.71388 -45.32037,-4.9837 0.0522,6.24397 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5513"
+ style="fill:#4d4d9f;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -56.91756,-10.05543 46.3903,-25.73628 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5515"
+ style="fill:url(#linearGradient5533);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.27725,152.06598 -34.81726,27.91714 -56.91047,-9.20694 46.40736,-23.6939 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5517"
+ style="fill:url(#linearGradient5535);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -917.01819,189.11796 -0.0763,-9.13484 -56.91047,-9.20694 0.0692,8.28635 z"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path5519"
+ style="fill:url(#linearGradient5537);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m -882.22116,158.77986 -34.79703,30.3381 -0.0763,-9.13484 34.81726,-27.91714 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ <path
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ sodipodi:nodetypes="cs"
+ id="path5539"
+ d="m 578.20432,2193.446 c -33.42131,0.4928 -154.29148,1.0597 -169.87967,0.5649"
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 8;stroke-dashoffset:0;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:none"
+ inkscape:connector-curvature="0" />
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ id="text5545"
+ y="2208.1191"
+ x="252.82294"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
+ sodipodi:role="line"
+ x="252.82294"
+ y="2208.1191"
+ style="font-size:15px;text-align:end;text-anchor:end"
+ id="tspan5549">rsync</tspan></text>
+ <text
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ x="512.82294"
+ y="2208.1191"
+ id="text5553"
+ style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ id="tspan5555"
+ style="font-size:15px;text-align:end;text-anchor:end"
+ y="2208.1191"
+ x="512.82294"
+ sodipodi:role="line">rsync</tspan></text>
+ <path
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ sodipodi:nodetypes="cs"
+ id="path5557"
+ d="m 643.67405,2317.4401 c 0,-15.8948 -0.19308,-53.7582 -0.21931,-55.734"
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#Arrow1Mstart-3);marker-mid:none;marker-end:none"
+ inkscape:connector-curvature="0" />
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ id="text5559"
+ y="2299.1191"
+ x="631.82294"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
+ sodipodi:role="line"
+ x="631.82294"
+ y="2299.1191"
+ style="font-size:15px;text-align:end;text-anchor:end"
+ id="tspan5563">read index</tspan></text>
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#Arrow1Mstart-3);marker-mid:none;marker-end:none"
+ d="m 77.67405,2317.4401 c 0,-15.8948 -0.19308,-53.7582 -0.21931,-55.734"
+ id="path7293"
+ sodipodi:nodetypes="cs"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <text
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/nikolaz/Desktop/shared_index.png"
+ x="169.11583"
+ y="2299.1191"
+ id="text7295"
+ style="font-size:40px;font-style:normal;font-weight:normal;text-align:end;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ id="tspan7297"
+ style="font-size:15px;text-align:end;text-anchor:end"
+ y="2299.1191"
+ x="169.11583"
+ sodipodi:role="line">read index</tspan></text>
+ </g>
</g>
</svg>
12 years, 3 months
exo-jcr SVN: r5538 - jcr/branches/1.14-RSYNC/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-01-28 03:45:35 -0500 (Sat, 28 Jan 2012)
New Revision: 5538
Modified:
jcr/branches/1.14-RSYNC/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java
Log:
EXOJCR-1709 : change logger usage
Modified: jcr/branches/1.14-RSYNC/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java
===================================================================
--- jcr/branches/1.14-RSYNC/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java 2012-01-27 14:09:27 UTC (rev 5537)
+++ jcr/branches/1.14-RSYNC/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/RsyncIndexInfos.java 2012-01-28 08:45:35 UTC (rev 5538)
@@ -141,6 +141,8 @@
new RSyncJob(String.format(urlFormatString, address), indexPath, rsyncUserName, rsyncPassword);
try
{
+ // synchronizing access to RSync Job.
+ // No parallel jobs allowed
synchronized (this)
{
rSyncJob.execute();
@@ -154,6 +156,9 @@
}
}
+ /**
+ * Wrapper of native process calling RSYNC utility
+ */
private class RSyncJob
{
private final static String RSYNC_USER_SYSTEM_PROPERTY = "USER";
@@ -178,14 +183,22 @@
this.password = password;
}
- // TODO : Use JNI and librsync library? or handle err stream
+ /**
+ * Executes RSYNC synchronization job
+ *
+ * @throws IOException
+ */
public void execute() throws IOException
{
+ // Future todo: Use JNI and librsync library?
Runtime run = Runtime.getRuntime();
try
{
String command = "rsync -rv --delete " + src + " " + dst;
- log.info("Rsync job started: " + command);
+ if (log.isDebugEnabled())
+ {
+ log.debug("Rsync job started: " + command);
+ }
if (userName != null && password != null)
{
String[] envProperties =
@@ -235,8 +248,11 @@
// oops, this can happen sometimes
}
}
- log.info("Rsync job finished: " + returnCode + ". Error stream output \n" + stringBuilderErr.toString()
- + " Standard stream output \n" + stringBuilderStd.toString());
+ if (log.isDebugEnabled())
+ {
+ log.debug("Rsync job finished: " + returnCode + ". Error stream output \n" + stringBuilderErr.toString()
+ + " Standard stream output \n" + stringBuilderStd.toString());
+ }
if (returnCode != 0)
{
throw new IOException("RSync job finished with exit code is " + returnCode + ". Error stream output: \n"
12 years, 3 months