...
The Resource Index module is configured with fedora.fcfg
. Here's an example of a Resource Index module configuration that uses Mulgara with delayed updates:
Code Block |
---|
| xml | xml |
---|
borderStyle | solid |
---|
| xml |
---|
|
<module role="fedora.server.resourceIndex.ResourceIndex"
class="fedora.server.resourceIndex.ResourceIndexModule">
<param name="level" value="1"/>
<param name="datastore" value="localMulgaraTriplestore"/>
<param name="syncUpdates" value="false"/>
</module>
|
Here's another example, this time using MPTStore with immediate updates:
Code Block |
xml |
---|
|
<module role="fedora.server.resourceIndex.ResourceIndex"
class="fedora.server.resourceIndex.ResourceIndexModule">
<param name="level" value="1"/>
<param name="datastore" value="localPostgresMPTTriplestore"/>
<param name="syncUpdates" value="true"/>
</module>
|
...
The example datastore configuration below (with the path parameter modified for the installation environment) would provide a local Mulgara triplestore that buffers up to 20,000 triples in memory at a time or waits for 5 seconds of buffer inactivity before flushing them to disk. Because writing triples to disk is a relatively expensive operation, the buffer takes advantage of Mulgara's bulk update handler to ingest a mass of triples at a time. The performance gain is significant during a bulk ingest of objects. The size or inactivity interval of the buffer may be adjusted according to performance needs and physical memory capacity.
Code Block |
xml |
---|
|
<datastore id="localMulgaraTriplestore">
<param name="connectorClassName" value="org.trippi.impl.mulgara.MulgaraConnector"/>
<param name="remote" value="false"/>
<param name="path" value="/opt/fedora/store/resourceIndex"/>
<param name="serverName" value="fedora"/>
<param name="modelName" value="ri"/>
<param name="poolInitialSize" value="3"/>
<param name="poolMaxGrowth" value="-1"/>
<param name="readOnly" value="false"/>
<param name="autoCreate" value="true"/>
<param name="autoTextIndex" value="false"/>
<param name="memoryBuffer" value="true"/>
<param name="autoFlushDormantSeconds" value="5"/>
<param name="autoFlushBufferSize" value="20000"/>
<param name="bufferSafeCapacity" value="40000"/>
<param name="bufferFlushBatchSize" value="20000"/>
</datastore>
|
...
An example datastore configuration for a remote Mulgara instance follows. The Resource Index module must be configured to use this datastore.
Code Block |
xml |
---|
|
<datastore id="remoteMulgaraTriplestore">
<param name="connectorClassName" value="org.trippi.impl.mulgara.MulgaraConnector"/>
<param name="remote" value="true"/>
<param name="host" value="localhost"/>
<param name="port" value="1099"/>
<param name="serverName" value="fedora"/>
<param name="modelName" value="ri"/>
<param name="poolInitialSize" value="3"/>
<param name="poolMaxGrowth" value="-1"/>
<param name="readOnly" value="false"/>
<param name="autoCreate" value="true"/>
<param name="autoTextIndex" value="false"/>
<param name="memoryBuffer" value="true"/>
<param name="autoFlushDormantSeconds" value="5"/>
<param name="autoFlushBufferSize" value="20000"/>
<param name="bufferSafeCapacity" value="40000"/>
<param name="bufferFlushBatchSize" value="20000"/>
</datastore>
|
...
The example datastore configuration below would provide a local MPTStore triplestore backed by Postgresql.
Code Block |
xml |
---|
|
<datastore id="localPostgresMPTTriplestore">
<comment>
Example local MPTStore backed by Postgres.
To use this triplestore for the Resource Index:
1) In fedora.fcfg, change the "datastore" parameter of the
ResourceIndex module to localPostgresMPTTriplestore.
2) Login to your Postgres server as an administrative user and
run the following commands:
CREATE ROLE "fedoraAdmin" LOGIN PASSWORD 'fedoraAdmin'
NOINHERIT CREATEDB
VALID UNTIL 'infinity';
CREATE DATABASE "riTriples"
WITH ENCODING='SQL_ASCII'
OWNER="fedoraAdmin";
3) Make sure you can login to your Postgres server as fedoraAdmin.
4) Download the appropriate Postgres JDBC 3 driver from
http://jdbc.postgresql.org/download.html
and make sure it's accessible to your servlet container.
If you're running Tomcat, putting it in common/lib/ will work.
</comment>
<param name="connectorClassName" value="org.trippi.impl.mpt.MPTConnector"/>
<param name="ddlGenerator" value="org.nsdl.mptstore.impl.postgres.PostgresDDLGenerator"/>
<param name="jdbcDriver" value="org.postgresql.Driver"/>
<param name="jdbcURL" value="jdbc:postgresql://localhost/riTriples"/>
<param name="username" value="fedoraAdmin"/>
<param name="password" value="fedoraAdmin"/>
<param name="poolInitialSize" value="3"/>
<param name="poolMaxSize" value="10"/>
<param name="backslashIsEscape" value="true"/>
<param name="fetchSize" value="1000"/>
<param name="autoFlushDormantSeconds" value="5"/>
<param name="autoFlushBufferSize" value="1000"/>
<param name="bufferFlushBatchSize" value="1000"/>
<param name="bufferSafeCapacity" value="2000"/>
</datastore>
|
...
Include Page |
---|
| FEDORA35:_FC Wiki CopyrightFEDORA35: |
---|
| _FC Wiki Copyright |
---|
|