Author: tommaso
Date: Tue Dec 15 10:06:19 2015
New Revision: 1720109
URL: http://svn.apache.org/viewvc?rev=1720109&view=rev
Log:
OAK-1736 - added scalability benchmark for facets
Added:
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/benchmarks/FacetSearcher.java
(with props)
Modified:
jackrabbit/oak/trunk/oak-run/pom.xml
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java
Modified: jackrabbit/oak/trunk/oak-run/pom.xml
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/pom.xml?rev=1720109&r1=1720108&r2=1720109&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-run/pom.xml Tue Dec 15 10:06:19 2015
@@ -463,6 +463,11 @@
<version>${lucene.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-facet</artifactId>
+ <version>${lucene.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>oak-solr-osgi</artifactId> <!-- this is declared here to
avoid having it in the jr2 profile too -->
<version>${project.version}</version>
Modified:
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java?rev=1720109&r1=1720108&r2=1720109&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java
(original)
+++
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java
Tue Dec 15 10:06:19 2015
@@ -47,6 +47,7 @@ import org.apache.jackrabbit.oak.fixture
import org.apache.jackrabbit.oak.scalability.benchmarks.AggregateNodeSearcher;
import org.apache.jackrabbit.oak.scalability.benchmarks.ConcurrentReader;
import org.apache.jackrabbit.oak.scalability.benchmarks.ConcurrentWriter;
+import org.apache.jackrabbit.oak.scalability.benchmarks.FacetSearcher;
import org.apache.jackrabbit.oak.scalability.benchmarks.FormatSearcher;
import org.apache.jackrabbit.oak.scalability.benchmarks.FullTextSearcher;
import org.apache.jackrabbit.oak.scalability.benchmarks.LastModifiedSearcher;
@@ -158,6 +159,7 @@ public class ScalabilityRunner {
.addBenchmarks(new FullTextSearcher(),
new NodeTypeSearcher(),
new FormatSearcher(),
+ new FacetSearcher(),
new
LastModifiedSearcher(Date.LAST_2_HRS),
new
LastModifiedSearcher(Date.LAST_24_HRS),
new
LastModifiedSearcher(Date.LAST_7_DAYS),
Added:
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/benchmarks/FacetSearcher.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/benchmarks/FacetSearcher.java?rev=1720109&view=auto
==============================================================================
---
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/benchmarks/FacetSearcher.java
(added)
+++
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/benchmarks/FacetSearcher.java
Tue Dec 15 10:06:19 2015
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.scalability.benchmarks;
+
+import javax.annotation.Nonnull;
+import javax.jcr.RepositoryException;
+import javax.jcr.query.Query;
+import javax.jcr.query.QueryManager;
+
+import org.apache.jackrabbit.oak.scalability.suites.ScalabilityAbstractSuite;
+
+/**
+ * Scalability test for facet query implementation
+ */
+public class FacetSearcher extends SearchScalabilityBenchmark {
+
+ @Override
+ protected Query getQuery(@Nonnull QueryManager qm,
ScalabilityAbstractSuite.ExecutionContext context) throws RepositoryException {
+
+ final String statement = "select [jcr:path], [facet(jcr:primaryType)]
from [nt:base] where native('lucene','*:*')";
+
+ LOG.debug("statement: {}", statement);
+
+ return qm.createQuery(statement, Query.JCR_SQL2);
+ }
+
+
+}
\ No newline at end of file
Propchange:
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/benchmarks/FacetSearcher.java
------------------------------------------------------------------------------
svn:eol-style = native