How to configure Amazon S3 as remote cache store for Hibernate Search 4.5.3

旧巷老猫 提交于 2019-12-13 02:48:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!