view distribution/packaging/fedora/0003_rhel_lucene_4.patch @ 2609:3e0b81d9b291

Use modifiable Lucene coordinates in heap dump assembly Reviewed-by: jerboaa Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-March/022340.html PR3239
author Elliott Baron <ebaron@redhat.com>
date Mon, 06 Mar 2017 11:11:51 -0500
parents ca32ab5d3635
children
line wrap: on
line source

diff --git a/pom.xml b/pom.xml
--- a/pom.xml
+++ b/pom.xml
@@ -286,8 +286,8 @@
     <jffi.version>1.2.12</jffi.version>
 
     <jline.version>2.13</jline.version>
-    <lucene.version>5.1.0_1</lucene.version>
-    <lucene.osgi-version>5.1.0.1</lucene.osgi-version>
+    <lucene.version>4.7.0_1</lucene.version>
+    <lucene.osgi-version>4.7.0.1</lucene.osgi-version>
     <byteman.version>3.0.5</byteman.version>
     <byteman.osgi-version>3.0.5</byteman.osgi-version>
     <lucene-analysis.maven-coords>org.apache.servicemix.bundles:org.apache.servicemix.bundles.lucene-analyzers-common</lucene-analysis.maven-coords>
diff --git a/vm-heap-analysis/common/src/main/java/com/redhat/thermostat/vm/heap/analysis/common/HeapDump.java b/vm-heap-analysis/common/src/main/java/com/redhat/thermostat/vm/heap/analysis/common/HeapDump.java
--- a/vm-heap-analysis/common/src/main/java/com/redhat/thermostat/vm/heap/analysis/common/HeapDump.java
+++ b/vm-heap-analysis/common/src/main/java/com/redhat/thermostat/vm/heap/analysis/common/HeapDump.java
@@ -66,6 +66,7 @@
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.LockObtainFailedException;
 import org.apache.lucene.store.RAMDirectory;
+import org.apache.lucene.util.Version;
 
 import com.redhat.thermostat.common.utils.LoggingUtils;
 import com.redhat.thermostat.vm.heap.analysis.common.model.HeapInfo;
@@ -142,7 +143,7 @@
 
         Enumeration<JavaHeapObject> thingos = snapshot.getThings();
         Directory dir = new RAMDirectory();
-        IndexWriterConfig indexWriterConfig = new IndexWriterConfig(new SimpleAnalyzer());
+        IndexWriterConfig indexWriterConfig = new IndexWriterConfig(Version.LUCENE_47, new SimpleAnalyzer(Version.LUCENE_47));
         IndexWriter writer = new IndexWriter(dir, indexWriterConfig);
         while (thingos.hasMoreElements()) {
             JavaHeapObject thingo = thingos.nextElement();