问题
I have configured Hibernate Search to use infinispan and use File System based Cache Store to persist the indexes in file system instead of memory.
Now, I wish to configure S3 instead of File System, but I am not able to find the correct configuration for this.
My infinispan.xml file is:
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"
xmlns="urn:infinispan:config:6.0">
<global>
<globalJmxStatistics enabled="false" />
<!-- <transport clusterName="storage-test-cluster" /> -->
<shutdown hookBehavior="DONT_REGISTER" />
</global>
<default>
<storeAsBinary
enabled="false" />
<locking
isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000"
writeSkewCheck="false"
concurrencyLevel="5000"
useLockStriping="false" />
<invocationBatching
enabled="false" />
</default>
<namedCache name="LuceneIndexesMetadata">
<persistence passivation="false">
<singleFile
fetchPersistentState="true"
preload="true"
purgeOnStartup="false"
shared="true"
ignoreModifications="false"
location="C:\\infinispan">
</singleFile>
</persistence>
</namedCache>
<namedCache name="LuceneIndexesData">
<persistence passivation="false">
<singleFile
fetchPersistentState="true"
preload="true"
purgeOnStartup="false"
shared="true"
ignoreModifications="false"
location="C:\\infinispan">
</singleFile>
</persistence>
</namedCache>
<namedCache name="LuceneIndexesLocking">
<!-- No CacheLoader configured here -->
</namedCache>
</infinispan>
Can anyone help me in configuring this file to use Amazon S3 as Cache Store.
回答1:
The specific versions of Hibernate Search and Infinispan which you're using are extremely old. Specifically, Infinispan didn't support storage on Amazon S3 in version 6.
I would suggest upgrading to some more recent version which is still being maintained.
As of writing this, you could use Infinispan 9.1.5.Final with Hibernate Search 5.8.2.Final.
来源:https://stackoverflow.com/questions/48502021/how-to-configure-amazon-s3-as-remote-cache-store-for-hibernate-search-4-5-3