我将开始在社区版本中集群由hippocms运行的jackrabbit存储库。我已经启动并运行它,但是我不了解某些配置。

我以这种方式了解集群兔子的概念:两个带有两个本地存储库的实例,这些实例由火箭科学期刊通过共享数据库进行同步,但是每个节点都在使用它的本地存储库。

阅读以下页面后,我得到了以下配置。

链接:


http://wiki.apache.org/jackrabbit/Clustering
http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/resources/org/apache/jackrabbit/core/cluster/repository-h2.xml?view=co&content-type=text/plain
http://greymeister.net/blog/2011/11/28/jackrabbit-clustering-primer.html


信息:
sharedRepositoryDS指向共享数据库
repositoryDS指向本地数据库(在每个节点上)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Repository PUBLIC
        "-//The Apache Software Foundation//DTD Jackrabbit 1.5//EN"
        "http://jackrabbit.apache.org/dtd/repository-1.5.dtd">

<Repository>

    <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
        <param name="url" value="java:comp/env/jdbc/sharedRepositoryDS"/>
        <param name="driver" value="javax.naming.InitialContext"/>
        <param name="schemaObjectPrefix" value="repository_"/>
        <param name="schema" value="mysql"/>
    </FileSystem>

    <Security appName="Jackrabbit">
        <SecurityManager
                class="org.hippoecm.repository.security.SecurityManager"/>
        <AccessManager
                class="org.hippoecm.repository.security.HippoAccessManager"/>
        <LoginModule
                class="org.hippoecm.repository.security.HippoLoginModule"/>
    </Security>

    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>

    <Workspace name="${wsp.name}">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
            <param name="url" value="java:comp/env/jdbc/repositoryDS"/>
            <param name="driver" value="javax.naming.InitialContext"/>
            <param name="schemaObjectPrefix" value="${wsp.name}_"/>
            <param name="schema" value="mysql"/>
        </FileSystem>

        <PersistenceManager
                class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
            <param name="driver" value="javax.naming.InitialContext"/>
            <param name="url" value="java:comp/env/jdbc/sharedRepositoryDS"/>
            <param name="schemaObjectPrefix" value="${wsp.name}_"/>
            <param name="externalBLOBs" value="true"/>
            <param name="consistencyCheck" value="false"/>
            <param name="consistencyFix" value="false"/>
        </PersistenceManager>

        <SearchIndex class="org.hippoecm.repository.FacetedNavigationEngineImpl">
            <param name="indexingConfiguration" value="indexing_configuration.xml"/>
            <param name="indexingConfigurationClass"
                   value="org.hippoecm.repository.query.lucene.ServicingIndexingConfigurationImpl"/>
            <param name="path" value="${wsp.home}/index"/>
            <param name="useCompoundFile" value="true"/>
            <param name="minMergeDocs" value="1000"/>
            <param name="volatileIdleTime" value="10"/>
            <param name="maxMergeDocs" value="1000000000"/>
            <param name="mergeFactor" value="5"/>
            <param name="maxFieldLength" value="10000"/>
            <param name="bufferSize" value="1000"/>
            <param name="cacheSize" value="100000"/>
            <param name="enableConsistencyCheck" value="true"/>
            <param name="autoRepair" value="true"/>
            <param name="analyzer"
                   value="org.hippoecm.repository.query.lucene.StandardHippoAnalyzer"/>
            <param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl"/>
            <param name="respectDocumentOrder" value="false"/>
            <param name="resultFetchSize" value="100"/>
            <param name="extractorPoolSize" value="0"/>
            <param name="extractorTimeout" value="100"/>
            <param name="extractorBackLogSize" value="100"/>
            <param name="excerptProviderClass"
                   value="org.apache.jackrabbit.core.query.lucene.DefaultHTMLExcerpt"/>
            <!-- supportHighlighting value is ignored, see REPO-711 -->
            <param name="supportHighlighting" value="false"/>

            <param name="supportSimilarityOnStrings" value="true"/>
            <param name="supportSimilarityOnBinaries" value="false"/>
            <param name="slowAlwaysExactSizedQueryResult" value="false"/>

            <param name="onWorkspaceInconsistency" value="log"/>
            <!-- optional cache parameters for faceted engine. The default size
            when not configured is 1000 for both parameters -->
            <!-- param name="docIdSetCacheSize" value="1000"/>
            <param name="facetValueCountMapCacheSize" value="1000"/-->
        </SearchIndex>

        <ISMLocking
                class="org.apache.jackrabbit.core.state.FineGrainedISMLocking"/>
    </Workspace>

    <Versioning rootPath="${rep.home}/version">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
            <param name="url" value="java:comp/env/jdbc/repositoryDS"/>
            <param name="driver" value="javax.naming.InitialContext"/>
            <param name="schemaObjectPrefix" value="version_"/>
            <param name="schema" value="mysql"/>
        </FileSystem>

        <PersistenceManager
                class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
            <param name="driver" value="javax.naming.InitialContext"/>
            <param name="url" value="java:comp/env/jdbc/sharedRepositoryDS"/>
            <param name="schemaObjectPrefix" value="version_"/>
            <param name="externalBLOBs" value="true"/>
            <param name="consistencyCheck" value="false"/>
            <param name="consistencyFix" value="false"/>
        </PersistenceManager>
        <ISMLocking
                class="org.apache.jackrabbit.core.state.FineGrainedISMLocking"/>
    </Versioning>

    <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
        <param name="url" value="java:comp/env/jdbc/sharedRepositoryDS"/>
        <param name="driver" value="javax.naming.InitialContext"/>
        <param name="databaseType" value="mysql"/>
        <param name="minRecordLength" value="1024"/>
        <param name="maxConnections" value="5"/>
        <param name="copyWhenReading" value="true"/>
    </DataStore>

    <Cluster id="node1" syncDelay="2000">
        <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
            <param name="revision" value="${rep.home}/revision.log" />
            <param name="driver" value="javax.naming.InitialContext"/>
            <param name="url" value="java:comp/env/jdbc/sharedRepositoryDS"/>
            <param name="databaseType" value="mysql"/>
            <param name="schemaObjectPrefix" value="journal_"/>
        </Journal>
    </Cluster>
</Repository>


问题:


配置是否正确?
什么是repository.FileSystem?
与repository.Workspace.FileSystem有什么区别?
PersistenceManager负责写入数据,但是为什么要将其写入共享数据库? (我想摆脱这个瓶颈吧?)


数据库表
这是本地节点数据库的样子(我觉得有点太少了):


共享数据库如下所示:

最佳答案

对Hippo的群集支持是针对企业版的,最好通过[email protected]与我们联系,以获取针对您特定情况的详细解答。

关于java - 与Jackrabbit聚类,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31183179/

10-12 15:55