2

我即将开始在社区版本中对由hippocms运行的 jackrabbit 存储库进行集群。我启动并运行了它,但配置的某些部分我不明白。

我以这种方式理解了集群jackrabbit的概念:例如,您有两个具有两个本地存储库的实例,它们通过共享数据库由火箭科学期刊同步,但每个节点都使用它的本地存储库。

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

链接:

信息: 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> 

问题:

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

数据库表 这是本地节点数据库的样子(对我来说有点太少了): 在此处输入图像描述

这是共享数据库的样子: 在此处输入图像描述

4

1 回答 1

-4

Hippo 的集群支持适用于企业版,最好通过 sales@onehippo.com 与我们联系,以获取针对您的具体案例的详细答案。

于 2015-07-06T13:55:12.510 回答