You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rya.apache.org by ca...@apache.org on 2018/01/18 16:40:03 UTC

[1/2] incubator-rya git commit: RYA-410 Add geo profile dependency management to the rya-project pom file. Closes #252.

Repository: incubator-rya
Updated Branches:
  refs/heads/master c826ffea4 -> 6ec8cd2aa


RYA-410 Add geo profile dependency management to the rya-project pom file. Closes #252.


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

Branch: refs/heads/master
Commit: d0146ce7498d63d2523ddb22c7604c305c6b6cd4
Parents: c826ffe
Author: kchilton2 <ke...@gmail.com>
Authored: Mon Dec 4 14:41:27 2017 -0500
Committer: caleb <ca...@parsons.com>
Committed: Wed Jan 17 15:37:36 2018 -0500

----------------------------------------------------------------------
 extras/rya.geoindexing/geo.common/pom.xml  |  12 +-
 extras/rya.geoindexing/geo.geomesa/pom.xml |  14 +-
 extras/rya.geoindexing/geo.geowave/pom.xml |  19 +-
 extras/rya.geoindexing/geo.mongo/pom.xml   |  21 +-
 extras/rya.geoindexing/pom.xml             | 249 +++++-------------------
 extras/rya.streams/geo/pom.xml             |   6 +-
 extras/rya.streams/kafka/pom.xml           |   2 -
 pom.xml                                    | 102 ++++++++--
 web/web.rya/pom.xml                        |   1 -
 9 files changed, 191 insertions(+), 235 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/d0146ce7/extras/rya.geoindexing/geo.common/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.geoindexing/geo.common/pom.xml b/extras/rya.geoindexing/geo.common/pom.xml
index 3d13f94..cbb2e2c 100644
--- a/extras/rya.geoindexing/geo.common/pom.xml
+++ b/extras/rya.geoindexing/geo.common/pom.xml
@@ -28,4 +28,14 @@
     <artifactId>rya.geo.common</artifactId>
     <name>Apache Rya Geo Indexing Common Code</name>
 
-</project>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>rya.indexing</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.vividsolutions</groupId>
+            <artifactId>jts</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/d0146ce7/extras/rya.geoindexing/geo.geomesa/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.geoindexing/geo.geomesa/pom.xml b/extras/rya.geoindexing/geo.geomesa/pom.xml
index 210d07f..05a6cee 100644
--- a/extras/rya.geoindexing/geo.geomesa/pom.xml
+++ b/extras/rya.geoindexing/geo.geomesa/pom.xml
@@ -34,8 +34,15 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.rya</groupId>
+            <artifactId>rya.indexing</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>accumulo.rya</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
             <artifactId>rya.geo.common</artifactId>
-            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.locationtech.geomesa</groupId>
@@ -51,5 +58,10 @@
             <artifactId>gt-api</artifactId>
             <version>${geotools.version}</version>
         </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/d0146ce7/extras/rya.geoindexing/geo.geowave/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.geoindexing/geo.geowave/pom.xml b/extras/rya.geoindexing/geo.geowave/pom.xml
index 9ce1291..ce06fbe 100644
--- a/extras/rya.geoindexing/geo.geowave/pom.xml
+++ b/extras/rya.geoindexing/geo.geowave/pom.xml
@@ -34,19 +34,24 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.rya</groupId>
+            <artifactId>rya.indexing</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>accumulo.rya</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
             <artifactId>rya.geo.common</artifactId>
-            <version>${project.version}</version>
         </dependency>
 
         <dependency>
             <groupId>mil.nga.giat</groupId>
             <artifactId>geowave-datastore-accumulo</artifactId>
-            <version>${geowave.version}</version>
         </dependency>
         <dependency>
             <groupId>mil.nga.giat</groupId>
             <artifactId>geowave-adapter-vector</artifactId>
-            <version>${geowave.version}</version>
         </dependency>
         <dependency>
             <groupId>org.geotools.xsd</groupId>
@@ -58,5 +63,11 @@
             <artifactId>gt-api</artifactId>
             <version>${geotools.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
-</project>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/d0146ce7/extras/rya.geoindexing/geo.mongo/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.geoindexing/geo.mongo/pom.xml b/extras/rya.geoindexing/geo.mongo/pom.xml
index 154fd4e..bd43ab0 100644
--- a/extras/rya.geoindexing/geo.mongo/pom.xml
+++ b/extras/rya.geoindexing/geo.mongo/pom.xml
@@ -35,14 +35,33 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.rya</groupId>
+            <artifactId>rya.indexing</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>mongodb.rya</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
             <artifactId>rya.geo.common</artifactId>
-            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.geotools.xsd</groupId>
             <artifactId>gt-xsd-gml3</artifactId>
             <version>${geotools.version}</version>
         </dependency>
+
+        <!-- Testing dependencies. -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.apache.rya</groupId>
             <artifactId>mongodb.rya</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/d0146ce7/extras/rya.geoindexing/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.geoindexing/pom.xml b/extras/rya.geoindexing/pom.xml
index ba98fe8..ee85480 100644
--- a/extras/rya.geoindexing/pom.xml
+++ b/extras/rya.geoindexing/pom.xml
@@ -1,206 +1,51 @@
 <?xml version='1.0'?>
-
-<!-- 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. -->
-
+<!--
+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.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.rya</groupId>
-    <artifactId>rya.extras</artifactId>
-    <version>3.2.12-incubating-SNAPSHOT</version>
-  </parent>
-  <artifactId>rya.geoindexing</artifactId>
-  <packaging>pom</packaging>
-  <name>Apache Rya Geo Indexing Projects</name>
-  <description>This parent has several alternative implementations using different libraries or versions of the same library.  
-  Specifically 
-          Geomesa depends on geotools v5.1 and 
-          GeoWave depends on geotools v6.
-  See the module poms for the actual versions.
-  </description>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.rya</groupId>
+        <artifactId>rya.extras</artifactId>
+        <version>3.2.12-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>rya.geoindexing</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Apache Rya Geo Indexing Projects</name>
+    <description>
+        This parent has several alternative implementations using different libraries or versions of the same library.  
+        Specifically 
+            Geomesa depends on geotools v5.1 and 
+            GeoWave depends on geotools v6.
+        See the module poms for the actual versions.
+     </description>
+
      <modules>
         <!-- common for all implementations  -->
-     	 <!-- geomesa for accumulo, uses geotools (not compatible with geowave's dependencies)   -->
-     	 <!-- geo wave for accumulo, uses geotools (not compatible with geomesa's dependencies)  -->
-     	 <!-- mongo native geo, not accumulo  -->
-     	<module>geo.common</module>
-     	<module>geo.geomesa</module>
-     	<module>geo.geowave</module>
-     	<module>geo.mongo</module>
-     </modules>
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-	<dependencies>
-		<dependency>
-			<groupId>com.vividsolutions</groupId>
-			<artifactId>jts</artifactId>
-			<version>1.13</version>
-		</dependency>
-		<dependency>
-		   <groupId>org.apache.accumulo</groupId>
-            <artifactId>accumulo-minicluster</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>rya.sail</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>hsqldb</artifactId>
-                    <groupId>hsqldb</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>rya.indexing</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>accumulo.rya</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>mongodb.rya</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>rya.prospector</artifactId>
-        </dependency>
-
-        <!-- Free Text Indexing -->
-        <dependency>
-            <groupId>org.apache.lucene</groupId>
-            <artifactId>lucene-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.lucene</groupId>
-            <artifactId>lucene-analyzers</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-        </dependency>
-
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.mockito</groupId>
-			<artifactId>mockito-all</artifactId>
-			<scope>test</scope>
-		</dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>accumulo.rya</artifactId>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>mongodb.rya</artifactId>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-	<build>
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<groupId>org.apache.rat</groupId>
-					<artifactId>apache-rat-plugin</artifactId>
-					<configuration>
-						<excludes>
-							<!-- RDF data Files -->
-							<exclude>**/*.ttl</exclude>
-
-							<!-- Services Files -->
-							<exclude>**/resources/META-INF/services/**</exclude>
-						</excludes>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-shade-plugin</artifactId>
-				<executions>
-					<execution>
-						<goals>
-							<goal>shade</goal>
-						</goals>
-						<configuration>
-							<shadedArtifactAttached>true</shadedArtifactAttached>
-							<shadedClassifierName>map-reduce</shadedClassifierName>
-							<transformers>
-								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-							</transformers>
-							<filters>
-								<filter>
-									<artifact>*:*</artifact>
-									<excludes>
-										<exclude>META-INF/*.SF</exclude>
-										<exclude>META-INF/*.DSA</exclude>
-										<exclude>META-INF/*.RSA</exclude>
-									</excludes>
-								</filter>
-							</filters>
-						</configuration>
-					</execution>
-					<execution>
-						<id>accumulo-server</id>
-						<phase>package</phase>
-						<goals>
-							<goal>shade</goal>
-						</goals>
-						<configuration>
-							<shadedArtifactAttached>true</shadedArtifactAttached>
-							<shadedClassifierName>accumulo-server</shadedClassifierName>
-							<artifactSet>
-								<excludes>
-									<exclude>org.locationtech.geomesa:*</exclude>
-									<exclude>mil.nga.giat:*</exclude>
-									<exclude>scala:*</exclude>
-									<exclude>org.apache.accumulo:*</exclude>
-									<exclude>org.apache.thrift:*</exclude>
-									<exclude>org.apache.hadoop:*</exclude>
-									<exclude>org.apache.zookeeper:*</exclude>
-								</excludes>
-							</artifactSet>
-							<transformers>
-								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-							</transformers>
-							<filters>
-								<filter>
-									<artifact>*:*</artifact>
-									<excludes>
-										<exclude>META-INF/*.SF</exclude>
-										<exclude>META-INF/*.DSA</exclude>
-										<exclude>META-INF/*.RSA</exclude>
-									</excludes>
-								</filter>
-							</filters>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>
+        <!-- geomesa for accumulo, uses geotools (not compatible with geowave's dependencies)   -->
+        <!-- geo wave for accumulo, uses geotools (not compatible with geomesa's dependencies)  -->
+        <!-- mongo native geo, not accumulo  -->
+        <module>geo.common</module>
+        <module>geo.geomesa</module>
+        <module>geo.geowave</module>
+        <module>geo.mongo</module>
+    </modules>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/d0146ce7/extras/rya.streams/geo/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.streams/geo/pom.xml b/extras/rya.streams/geo/pom.xml
index 2f179d0..c4e8803 100644
--- a/extras/rya.streams/geo/pom.xml
+++ b/extras/rya.streams/geo/pom.xml
@@ -38,12 +38,14 @@ under the License.
         <dependency>
             <groupId>org.apache.rya</groupId>
             <artifactId>rya.pcj.functions.geo</artifactId>
-            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.rya</groupId>
             <artifactId>rya.geo.common</artifactId>
-            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>rya.indexing</artifactId>
         </dependency>
 
         <!-- Test dependencies -->

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/d0146ce7/extras/rya.streams/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.streams/kafka/pom.xml b/extras/rya.streams/kafka/pom.xml
index 16b07b2..4eb51b0 100644
--- a/extras/rya.streams/kafka/pom.xml
+++ b/extras/rya.streams/kafka/pom.xml
@@ -41,12 +41,10 @@ under the License.
                 <dependency>
                     <groupId>org.apache.rya</groupId>
                     <artifactId>rya.pcj.functions.geo</artifactId>
-                    <version>${project.version}</version>
                 </dependency>
                 <dependency>
                     <groupId>org.apache.rya</groupId>
                     <artifactId>rya.geo.common</artifactId>
-                    <version>${project.version}</version>
                 </dependency>
             </dependencies>
         </profile>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/d0146ce7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 99640f2..0648d99 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,13 +75,10 @@ under the License.
         <accumulo.version>1.6.4</accumulo.version> <!-- Newest: 1.7.0 -->
         <hadoop.version>2.5.0</hadoop.version> <!-- Newest: 2.7.1 -->
         
-        <!-- Required for GeoMesa 1.2.* -->
         <zookeeper.version>3.4.6</zookeeper.version>
 
         <pig.version>0.9.2</pig.version> <!-- Newest: 0.15.0 -->
 
-        <geomesa.version>1.3.0-m1</geomesa.version> <!-- Newest: 1.3.0-m1 -->
-        <geowave.version>0.9.3</geowave.version> <!-- Newest: 0.9.3 -->
         <lucene.version>3.6.2</lucene.version> <!-- Newest: 5.3.1 -->
         <joda-time.version>2.1</joda-time.version> <!-- Newest: 2.9.1 -->
 
@@ -145,7 +142,88 @@ under the License.
         <skip.rya.it>true</skip.rya.it>  <!-- modified by  -P enable-it  -->
     </properties>
     
+    <!-- Enable this profile if you want to include Geo functions within Rya. "mvn ... -P geoindexing" -->
     <profiles>
+        <profile>
+            <id>geoindexing</id>
+            <properties>
+                <geomesa.version>1.3.0-m1</geomesa.version> <!-- Newest: 1.3.0-m1 -->
+                <geowave.version>0.9.3</geowave.version> <!-- Newest: 0.9.3 -->
+                <jts.version>1.13</jts.version>
+            </properties>
+            <dependencyManagement>
+                <dependencies>
+                    <!-- Published RYA geo artifacts. -->
+                    <dependency>
+                        <groupId>org.apache.rya</groupId>
+                        <artifactId>rya.geo.common</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.rya</groupId>
+                        <artifactId>rya.geo.geomesa</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.rya</groupId>
+                        <artifactId>rya.geo.geowave</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
+                       <groupId>org.apache.rya</groupId>
+                        <artifactId>rya.geo.mongo</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
+                       <groupId>org.apache.rya</groupId>
+                        <artifactId>rya.geoindexing</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.rya</groupId>
+                        <artifactId>rya.pcj.functions.geo</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+
+                    <!-- Geomesa dependencies. -->
+                    <dependency>
+                        <groupId>org.locationtech.geomesa</groupId>
+                        <artifactId>geomesa-accumulo-datastore_2.11</artifactId>
+                        <version>${geomesa.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.locationtech.geomesa</groupId>
+                        <artifactId>geomesa-accumulo-distributed-runtime_2.11</artifactId>
+                        <version>${geomesa.version}</version>
+                    </dependency>
+                    
+                    <!-- Geowave dependencies. -->
+                    <dependency>
+                        <groupId>mil.nga.giat</groupId>
+                        <artifactId>geowave-parent</artifactId>
+                        <version>${geowave.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>mil.nga.giat</groupId>
+                        <artifactId>geowave-datastore-accumulo</artifactId>
+                        <version>${geowave.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>mil.nga.giat</groupId>
+                        <artifactId>geowave-adapter-vector</artifactId>
+                        <version>${geowave.version}</version>
+                    </dependency>
+                    
+                    <!-- Misc dependencies. -->
+                    <dependency>
+                        <groupId>com.vividsolutions</groupId>
+                        <artifactId>jts</artifactId>
+                        <version>1.13</version>
+                    </dependency>
+                </dependencies>
+            </dependencyManagement>
+        </profile>
+    
         <!-- enable this profile "mvn ... -P enable-it" -->
         <profile>
             <id>enable-it</id>
@@ -696,24 +774,6 @@ under the License.
                 <version>${lucene.version}</version>
             </dependency>
 
-            <!-- Geo Indexing -->
-            <dependency>
-                <groupId>org.locationtech.geomesa</groupId>
-                <artifactId>geomesa-accumulo-datastore_2.11</artifactId>
-                <version>${geomesa.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.locationtech.geomesa</groupId>
-                <artifactId>geomesa-accumulo-distributed-runtime_2.11</artifactId>
-                <version>${geomesa.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>mil.nga.giat</groupId>
-                <artifactId>geowave-parent</artifactId>
-                <version>${geowave.version}</version>
-            </dependency>
-
             <dependency>
                 <groupId>org.apache.zookeeper</groupId>
                 <artifactId>zookeeper</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/d0146ce7/web/web.rya/pom.xml
----------------------------------------------------------------------
diff --git a/web/web.rya/pom.xml b/web/web.rya/pom.xml
index 211add5..00f9874 100644
--- a/web/web.rya/pom.xml
+++ b/web/web.rya/pom.xml
@@ -203,7 +203,6 @@ under the License.
                 <dependency>
                     <groupId>org.apache.rya</groupId>
                     <artifactId>rya.geo.geowave</artifactId>
-                    <version>${project.version}</version>
                     <!-- GeoWave brings in org.springframework jars that are not compatible with web.rya versions -->
                     <exclusions>
                         <exclusion>


[2/2] incubator-rya git commit: RYA-413 Fixed how MongoDBRyaDAO closed its internal mongoClient. Updated AbstractMongoDBRdfConfigurationBuilder config tags. Closes #263.

Posted by ca...@apache.org.
RYA-413 Fixed how MongoDBRyaDAO closed its internal mongoClient. Updated AbstractMongoDBRdfConfigurationBuilder config tags. Closes #263.


Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/6ec8cd2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/6ec8cd2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/6ec8cd2a

Branch: refs/heads/master
Commit: 6ec8cd2aa7b5d8ce7631ee095336b5cf58eb99dc
Parents: d0146ce
Author: eric.white <Er...@parsons.com>
Authored: Fri Jan 5 11:38:48 2018 -0500
Committer: caleb <ca...@parsons.com>
Committed: Wed Jan 17 15:40:25 2018 -0500

----------------------------------------------------------------------
 .../AbstractMongoDBRdfConfigurationBuilder.java |  26 ++--
 .../org/apache/rya/mongodb/MongoDBRyaDAO.java   |   3 -
 .../apache/rya/mongodb/MongoDBRyaDAO2IT.java    |  65 ++++++++
 .../org/apache/rya/mongodb/MongoDBRyaDAOIT.java |  61 ++++++++
 .../sail/config/RyaMongoDbSailFactoryTest.java  | 149 +++++++++++++++++++
 5 files changed, 288 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/6ec8cd2a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/AbstractMongoDBRdfConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/AbstractMongoDBRdfConfigurationBuilder.java b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/AbstractMongoDBRdfConfigurationBuilder.java
index 369f7a0..8afcb42 100644
--- a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/AbstractMongoDBRdfConfigurationBuilder.java
+++ b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/AbstractMongoDBRdfConfigurationBuilder.java
@@ -40,23 +40,23 @@ public abstract class AbstractMongoDBRdfConfigurationBuilder<B extends AbstractM
     private boolean useMock = false;
     private String host = "localhost";
     private String port = DEFAULT_MONGO_PORT;
-    protected static final String DEFAULT_MONGO_PORT = "27017";
+    public static final String DEFAULT_MONGO_PORT = "27017";
     private String mongoCollectionPrefix = "rya_";
     private String mongoDBName = "rya";
     private boolean usePipeline = false;
 
-    protected static final String MONGO_USER = "mongo.user";
-    protected static final String MONGO_PASSWORD = "mongo.password";
-    protected static final String MONGO_DB_NAME = "mongo.db.name";
-    protected static final String MONGO_COLLECTION_PREFIX = "mongo.collection.prefix";
-    protected static final String MONGO_HOST = "mongo.host";
-    protected static final String MONGO_PORT = "mongo.port";
-    protected static final String MONGO_AUTHS = "mongo.auths";
-    protected static final String MONGO_VISIBILITIES = "mongo.visibilities";
-    protected static final String MONGO_RYA_PREFIX = "mongo.rya.prefix";
-    protected static final String USE_INFERENCE = "use.inference";
-    protected static final String USE_DISPLAY_QUERY_PLAN = "use.display.plan";
-    protected static final String USE_MOCK_MONGO = "use.mock";
+    public static final String MONGO_USER = "mongo.user";
+    public static final String MONGO_PASSWORD = "mongo.password";
+    public static final String MONGO_DB_NAME = "mongo.db.name";
+    public static final String MONGO_COLLECTION_PREFIX = "mongo.collection.prefix";
+    public static final String MONGO_HOST = "mongo.host";
+    public static final String MONGO_PORT = "mongo.port";
+    public static final String MONGO_AUTHS = "mongo.auths";
+    public static final String MONGO_VISIBILITIES = "mongo.visibilities";
+    public static final String MONGO_RYA_PREFIX = "mongo.rya.prefix";
+    public static final String USE_INFERENCE = "use.inference";
+    public static final String USE_DISPLAY_QUERY_PLAN = "use.display.plan";
+    public static final String USE_MOCK_MONGO = "use.mock";
 
     /**
      * Sets Mongo user.

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/6ec8cd2a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java
----------------------------------------------------------------------
diff --git a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java
index 75e33d1..d01c2d7 100644
--- a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java
+++ b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java
@@ -152,9 +152,6 @@ public final class MongoDBRyaDAO implements RyaDAO<StatefulMongoDBRdfConfigurati
                 log.error("Error closing indexer: " + indexer.getClass().getSimpleName(), e);
             }
         }
-        if (mongoClient != null) {
-            mongoClient.close();
-        }
 
         IOUtils.closeQuietly(queryEngine);
     }

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/6ec8cd2a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java
----------------------------------------------------------------------
diff --git a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java
index f2d24ad..67002d7 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java
@@ -18,7 +18,10 @@
  */
 package org.apache.rya.mongodb;
 
+import static org.apache.rya.mongodb.dao.SimpleMongoDBStorageStrategy.DOCUMENT_VISIBILITY;
+import static org.apache.rya.mongodb.dao.SimpleMongoDBStorageStrategy.TIMESTAMP;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
@@ -26,6 +29,7 @@ import org.apache.rya.api.domain.RyaStatement;
 import org.apache.rya.api.domain.RyaStatement.RyaStatementBuilder;
 import org.apache.rya.api.domain.RyaURI;
 import org.apache.rya.api.persist.RyaDAOException;
+import org.apache.rya.mongodb.document.visibility.DocumentVisibility;
 import org.bson.Document;
 import org.junit.Test;
 
@@ -135,4 +139,65 @@ public class MongoDBRyaDAO2IT extends MongoITBase {
             dao.destroy();
         }
     }
+
+    @Test
+    public void testReconstructDao() throws RyaDAOException, IOException {
+        MongoDBRyaDAO dao = new MongoDBRyaDAO();
+        try {
+            dao.setConf(conf);
+            dao.init();
+
+            final RyaStatementBuilder builder = new RyaStatementBuilder();
+            builder.setPredicate(new RyaURI("http://temp.com"));
+            builder.setSubject(new RyaURI("http://subject.com"));
+            builder.setObject(new RyaURI("http://object.com"));
+            builder.setColumnVisibility(new DocumentVisibility("B").flatten());
+
+            final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
+            final MongoCollection<Document> coll = db.getCollection(conf.getTriplesCollectionName());
+
+            dao.add(builder.build());
+
+            assertEquals(coll.count(), 1);
+
+            final Document dbo = coll.find().first();
+            assertTrue(dbo.containsKey(DOCUMENT_VISIBILITY));
+            assertTrue(dbo.containsKey(TIMESTAMP));
+        }  finally {
+            dao.destroy();
+        }
+
+        // Test reinitializing the same instance
+        try {
+            dao.init();
+        } finally {
+            dao.destroy();
+        }
+
+        // Reconstruct new DAO and try again
+        dao = new MongoDBRyaDAO();
+        try {
+            dao.setConf(conf);
+            dao.init();
+
+            final RyaStatementBuilder builder = new RyaStatementBuilder();
+            builder.setPredicate(new RyaURI("http://temp.com"));
+            builder.setSubject(new RyaURI("http://subject.com"));
+            builder.setObject(new RyaURI("http://object.com"));
+            builder.setColumnVisibility(new DocumentVisibility("B").flatten());
+
+            final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
+            final MongoCollection<Document> coll = db.getCollection(conf.getTriplesCollectionName());
+
+            dao.add(builder.build());
+
+            assertEquals(coll.count(), 1);
+
+            final Document dbo = coll.find().first();
+            assertTrue(dbo.containsKey(DOCUMENT_VISIBILITY));
+            assertTrue(dbo.containsKey(TIMESTAMP));
+        }  finally {
+            dao.destroy();
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/6ec8cd2a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAOIT.java
----------------------------------------------------------------------
diff --git a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAOIT.java b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAOIT.java
index a05393c..c5ff223 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAOIT.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAOIT.java
@@ -154,6 +154,67 @@ public class MongoDBRyaDAOIT extends MongoITBase {
     }
 
     @Test
+    public void testReconstructDao() throws RyaDAOException, IOException {
+        MongoDBRyaDAO dao = new MongoDBRyaDAO();
+        try {
+            dao.setConf(conf);
+            dao.init();
+
+            final RyaStatementBuilder builder = new RyaStatementBuilder();
+            builder.setPredicate(new RyaURI("http://temp.com"));
+            builder.setSubject(new RyaURI("http://subject.com"));
+            builder.setObject(new RyaURI("http://object.com"));
+            builder.setColumnVisibility(new DocumentVisibility("B").flatten());
+
+            final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
+            final MongoCollection<Document> coll = db.getCollection(conf.getTriplesCollectionName());
+
+            dao.add(builder.build());
+
+            assertEquals(coll.count(), 1);
+
+            final Document dbo = coll.find().first();
+            assertTrue(dbo.containsKey(DOCUMENT_VISIBILITY));
+            assertTrue(dbo.containsKey(TIMESTAMP));
+        }  finally {
+            dao.destroy();
+        }
+
+        // Test reinitializing the same instance
+        try {
+            dao.init();
+        } finally {
+            dao.destroy();
+        }
+
+        // Reconstruct new DAO and try again
+        dao = new MongoDBRyaDAO();
+        try {
+            dao.setConf(conf);
+            dao.init();
+
+            final RyaStatementBuilder builder = new RyaStatementBuilder();
+            builder.setPredicate(new RyaURI("http://temp.com"));
+            builder.setSubject(new RyaURI("http://subject.com"));
+            builder.setObject(new RyaURI("http://object.com"));
+            builder.setColumnVisibility(new DocumentVisibility("B").flatten());
+
+            final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
+            final MongoCollection<Document> coll = db.getCollection(conf.getTriplesCollectionName());
+
+            dao.add(builder.build());
+
+            assertEquals(coll.count(), 1);
+
+            final Document dbo = coll.find().first();
+            assertTrue(dbo.containsKey(DOCUMENT_VISIBILITY));
+            assertTrue(dbo.containsKey(TIMESTAMP));
+        }  finally {
+            dao.destroy();
+        }
+    }
+
+    @Test
     public void testVisibility() throws RyaDAOException, MongoException, IOException {
         final MongoDBRyaDAO dao = new MongoDBRyaDAO();
         try {

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/6ec8cd2a/extras/indexing/src/test/java/org/apache/rya/sail/config/RyaMongoDbSailFactoryTest.java
----------------------------------------------------------------------
diff --git a/extras/indexing/src/test/java/org/apache/rya/sail/config/RyaMongoDbSailFactoryTest.java b/extras/indexing/src/test/java/org/apache/rya/sail/config/RyaMongoDbSailFactoryTest.java
new file mode 100644
index 0000000..6cfd4ea
--- /dev/null
+++ b/extras/indexing/src/test/java/org/apache/rya/sail/config/RyaMongoDbSailFactoryTest.java
@@ -0,0 +1,149 @@
+/*
+ * 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.rya.sail.config;
+
+import static org.junit.Assert.assertFalse;
+
+import org.apache.rya.mongodb.MongoITBase;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openrdf.model.Statement;
+import org.openrdf.model.ValueFactory;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+
+/**
+ * Tests {@link RyaSailFactory} with a MongoDB backend.
+ */
+public class RyaMongoDbSailFactoryTest extends MongoITBase {
+    @Test
+    public void testCreateMongoDbSail() throws Exception {
+        Sail sail = null;
+        SailRepository repo = null;
+        SailRepositoryConnection conn = null;
+        try {
+            sail = RyaSailFactory.getInstance(conf);
+            repo = new SailRepository(sail);
+            conn = repo.getConnection();
+        } finally {
+            if (conn != null) {
+                conn.close();
+            }
+            if (repo != null) {
+                repo.shutDown();
+            }
+            if (sail != null) {
+                sail.shutDown();
+            }
+        }
+    }
+
+    @Test
+    public void testAddStatement() throws Exception {
+        Sail sail = null;
+        SailRepository repo = null;
+        SailRepositoryConnection conn = null;
+        try {
+            sail = RyaSailFactory.getInstance(conf);
+            repo = new SailRepository(sail);
+            conn = repo.getConnection();
+
+            final ValueFactory vf = conn.getValueFactory();
+            final Statement s = vf.createStatement(vf.createURI("u:a"), vf.createURI("u:b"), vf.createURI("u:c"));
+
+            assertFalse(conn.hasStatement(s, false));
+
+            conn.add(s);
+
+            Assert.assertTrue(conn.hasStatement(s, false));
+        } finally {
+            if (conn != null) {
+                conn.close();
+            }
+            if (repo != null) {
+                repo.shutDown();
+            }
+            if (sail != null) {
+                sail.shutDown();
+            }
+        }
+    }
+
+    @Test
+    public void testReuseSail() throws Exception {
+        Sail sail = null;
+        SailRepository repo = null;
+        SailRepositoryConnection conn = null;
+        try {
+            sail = RyaSailFactory.getInstance(conf);
+            repo = new SailRepository(sail);
+            conn = repo.getConnection();
+
+            final ValueFactory vf = conn.getValueFactory();
+            final Statement s = vf.createStatement(vf.createURI("u:a"), vf.createURI("u:b"), vf.createURI("u:c"));
+
+            assertFalse(conn.hasStatement(s, false));
+
+            conn.add(s);
+
+            Assert.assertTrue(conn.hasStatement(s, false));
+
+            conn.remove(s);
+
+            Assert.assertFalse(conn.hasStatement(s, false));
+        } finally {
+            if (conn != null) {
+                conn.close();
+            }
+            if (repo != null) {
+                repo.shutDown();
+            }
+            if (sail != null) {
+                sail.shutDown();
+            }
+        }
+
+        // Reuse Sail after shutdown
+        try {
+            sail = RyaSailFactory.getInstance(conf);
+            repo = new SailRepository(sail);
+            conn = repo.getConnection();
+
+            final ValueFactory vf = conn.getValueFactory();
+            final Statement s = vf.createStatement(vf.createURI("u:a"), vf.createURI("u:b"), vf.createURI("u:c"));
+
+            assertFalse(conn.hasStatement(s, false));
+
+            conn.add(s);
+
+            Assert.assertTrue(conn.hasStatement(s, false));
+        } finally {
+            if (conn != null) {
+                conn.close();
+            }
+            if (repo != null) {
+                repo.shutDown();
+            }
+            if (sail != null) {
+                sail.shutDown();
+            }
+        }
+    }
+}
\ No newline at end of file