lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsmi...@apache.org
Subject svn commit: r1672742 - in /lucene/dev/trunk/lucene: ./ benchmark/src/java/org/apache/lucene/benchmark/byTask/ benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/
Date Fri, 10 Apr 2015 20:04:22 GMT
Author: dsmiley
Date: Fri Apr 10 20:04:22 2015
New Revision: 1672742

URL: http://svn.apache.org/r1672742
Log:
LUCENE-6399: Benchmark's QueryMaker.resetInputs should call setConfig

Modified:
    lucene/dev/trunk/lucene/CHANGES.txt
    lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java
    lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/AbstractQueryMaker.java
    lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/QueryMaker.java

Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1672742&r1=1672741&r2=1672742&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Fri Apr 10 20:04:22 2015
@@ -92,6 +92,9 @@ Other
   when resolving deleted terms to matched docids. (Robert Muir, Adrien
   Grand, Mike McCandless)
 
+* LUCENE-6399: Benchmark module's QueryMaker.resetInputs should call setConfig
+  so queries can react to property changes in new rounds. (David Smiley)
+
 ======================= Lucene 5.1.0 =======================
 
 New Features

Modified: lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java?rev=1672742&r1=1672741&r2=1672742&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java
(original)
+++ lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java
Fri Apr 10 20:04:22 2015
@@ -421,7 +421,13 @@ public class PerfRunData implements Clos
     docMaker.resetInputs();
     facetSource.resetInputs();
     for (final QueryMaker queryMaker : readTaskQueryMaker.values()) {
-      queryMaker.resetInputs();
+      try {
+        queryMaker.resetInputs();
+      } catch (IOException e) {
+        throw e;
+      } catch (Exception e) {
+        throw new RuntimeException(e);
+      }
     }
   }
 

Modified: lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/AbstractQueryMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/AbstractQueryMaker.java?rev=1672742&r1=1672741&r2=1672742&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/AbstractQueryMaker.java
(original)
+++ lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/AbstractQueryMaker.java
Fri Apr 10 20:04:22 2015
@@ -15,8 +15,8 @@ package org.apache.lucene.benchmark.byTa
  * limitations under the License.
  */
 
-import org.apache.lucene.search.Query;
 import org.apache.lucene.benchmark.byTask.utils.Config;
+import org.apache.lucene.search.Query;
 
 /**
  * Abstract base query maker. 
@@ -29,8 +29,10 @@ public abstract class AbstractQueryMaker
   protected Config config;
 
   @Override
-  public void resetInputs() {
+  public void resetInputs() throws Exception {
     qnum = 0;
+    // re-initialize since properties by round may have changed.
+    setConfig(config);
   }
 
   protected abstract Query[] prepareQueries() throws Exception;

Modified: lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/QueryMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/QueryMaker.java?rev=1672742&r1=1672741&r2=1672742&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/QueryMaker.java
(original)
+++ lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/QueryMaker.java
Fri Apr 10 20:04:22 2015
@@ -18,8 +18,8 @@ package org.apache.lucene.benchmark.byTa
  */
 
 
-import org.apache.lucene.search.Query;
 import org.apache.lucene.benchmark.byTask.utils.Config;
+import org.apache.lucene.search.Query;
 
 
 /**
@@ -41,7 +41,7 @@ public interface QueryMaker {
   public void setConfig (Config config) throws Exception;
   
   /** Reset inputs so that the test run would behave, input wise, as if it just started.
*/
-  public void resetInputs();
+  public void resetInputs() throws Exception;
   
   /** Print the queries */
   public String printQueries();



Mime
View raw message