incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/5] git commit: Updates to the facet test.
Date Mon, 13 Jan 2014 18:53:18 GMT
Updated Branches:
  refs/heads/apache-blur-0.2 85ebe0a35 -> 2498bcb91


Updates to the facet test.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/902251ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/902251ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/902251ef

Branch: refs/heads/apache-blur-0.2
Commit: 902251ef5eed214ecc940ddfbc5d32671f447301
Parents: 85ebe0a
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Fri Jan 10 09:15:34 2014 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Fri Jan 10 09:15:34 2014 -0500

----------------------------------------------------------------------
 .../org/apache/blur/lucene/search/FacetQueryTest.java | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/902251ef/blur-query/src/test/java/org/apache/blur/lucene/search/FacetQueryTest.java
----------------------------------------------------------------------
diff --git a/blur-query/src/test/java/org/apache/blur/lucene/search/FacetQueryTest.java b/blur-query/src/test/java/org/apache/blur/lucene/search/FacetQueryTest.java
index 45d7354..e098e62 100644
--- a/blur-query/src/test/java/org/apache/blur/lucene/search/FacetQueryTest.java
+++ b/blur-query/src/test/java/org/apache/blur/lucene/search/FacetQueryTest.java
@@ -26,6 +26,7 @@ import java.io.IOException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.blur.BlurConfiguration;
 import org.apache.blur.concurrent.Executors;
 import org.apache.blur.trace.LogTraceStorage;
 import org.apache.blur.trace.Trace;
@@ -73,7 +74,7 @@ public class FacetQueryTest {
     IndexSearcher indexSearcher = new IndexSearcher(reader);
     indexSearcher.search(facetQuery, 10);
 
-    ExecutorService executor = getThreadPool();
+    ExecutorService executor = getThreadPool(10);
     facetExecutor.processFacets(executor);
     executor.shutdown();
     executor.awaitTermination(10, TimeUnit.SECONDS);
@@ -85,7 +86,8 @@ public class FacetQueryTest {
 
   @Test
   public void testFacetQueryPerformance() throws IOException, InterruptedException {
-    Trace.setStorage(new LogTraceStorage(null));
+    BlurConfiguration configuration = new BlurConfiguration();
+    Trace.setStorage(new LogTraceStorage(configuration));
     int facetCount = 200;
     int docCount = 1000000;
     IndexReader reader = createIndex(docCount, facetCount, false);
@@ -98,7 +100,7 @@ public class FacetQueryTest {
     ExecutorService executor = null;
     try {
       for (int t = 0; t < 5; t++) {
-        executor = getThreadPool();
+        executor = getThreadPool(20);
         IndexSearcher indexSearcher = new IndexSearcher(reader, executor);
         FacetExecutor facetExecutor = new FacetExecutor(facets.length);
         FacetQuery facetQuery = new FacetQuery(new TermQuery(new Term("f1", "value")), facets,
facetExecutor);
@@ -145,7 +147,7 @@ public class FacetQueryTest {
     ExecutorService executor = null;
     try {
       for (int t = 0; t < 5; t++) {
-        executor = getThreadPool();
+        executor = getThreadPool(10);
         IndexSearcher indexSearcher = new IndexSearcher(reader, executor);
         FacetExecutor facetExecutor = new FacetExecutor(facets.length, minimumsBeforeReturning);
         FacetQuery facetQuery = new FacetQuery(new TermQuery(new Term("f1", "value")), facets,
facetExecutor);
@@ -167,8 +169,8 @@ public class FacetQueryTest {
     }
   }
 
-  private ExecutorService getThreadPool() {
-    return Executors.newThreadPool("unittest-facets", 10);
+  private ExecutorService getThreadPool(int threads) {
+    return Executors.newThreadPool("unittest-facets", threads);
   }
 
   private IndexReader createIndex(int docCount, int facetFields, boolean ram) throws CorruptIndexException,


Mime
View raw message