You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sh...@apache.org on 2015/09/28 10:18:34 UTC
incubator-atlas git commit: ATLAS-102 Issue with SolrIndex
(suma.shivaprasad via shwethags)
Repository: incubator-atlas
Updated Branches:
refs/heads/master 57a7d1bc6 -> 5611f149e
ATLAS-102 Issue with SolrIndex (suma.shivaprasad via shwethags)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/5611f149
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/5611f149
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/5611f149
Branch: refs/heads/master
Commit: 5611f149ea6dee3a91a73f23fb267096fb960438
Parents: 57a7d1b
Author: Shwetha GS <ss...@hortonworks.com>
Authored: Mon Sep 28 13:48:26 2015 +0530
Committer: Shwetha GS <ss...@hortonworks.com>
Committed: Mon Sep 28 13:48:26 2015 +0530
----------------------------------------------------------------------
pom.xml | 38 ++------------------
release-log.txt | 1 +
repository/pom.xml | 4 +--
.../titan/diskstorage/solr/Solr5Index.java | 16 ++++++++-
4 files changed, 21 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/5611f149/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index db48a62..4c384e9 100755
--- a/pom.xml
+++ b/pom.xml
@@ -863,41 +863,9 @@
</dependency>
<dependency>
- <groupId>com.thinkaurelius.titan</groupId>
- <artifactId>titan-solr</artifactId>
- <version>${titan.version}</version>
- <exclusions>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>org.eclipse.jetty</groupId>
- </exclusion>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>javax.servlet</groupId>
- </exclusion>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>org.jruby.joni</groupId>
- </exclusion>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>org.eclipse.jetty.orbit</groupId>
- </exclusion>
-
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>org.restlet.jee</groupId>
- </exclusion>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>org.ow2.asm</groupId>
- </exclusion>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>org.apache.solr</groupId>
- </exclusion>
- </exclusions>
-
+ <groupId>com.vividsolutions</groupId>
+ <artifactId>jts</artifactId>
+ <version>1.13</version>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/5611f149/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index a867ac3..4461d61 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (suma.shivaprasad via shwethags)
ALL CHANGES:
+ATLAS-102 Issue with SolrIndex (suma.shivaprasad via shwethags)
ATLAS-194 Thread pool in hive hook should be static (shwethags)
ATLAS-180 Cleanup atlas doc packaging (shwethags)
ATLAS-147 Fix a code issue when defineTypes (ltfxyz via shwethags)
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/5611f149/repository/pom.xml
----------------------------------------------------------------------
diff --git a/repository/pom.xml b/repository/pom.xml
index 8e4d0f3..89d848c 100755
--- a/repository/pom.xml
+++ b/repository/pom.xml
@@ -90,8 +90,8 @@
</dependency>
<dependency>
- <groupId>com.thinkaurelius.titan</groupId>
- <artifactId>titan-solr</artifactId>
+ <groupId>com.vividsolutions</groupId>
+ <artifactId>jts</artifactId>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/5611f149/repository/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java b/repository/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
index e484c18..1470069 100644
--- a/repository/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
+++ b/repository/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
@@ -44,7 +44,6 @@ import com.thinkaurelius.titan.diskstorage.indexing.IndexProvider;
import com.thinkaurelius.titan.diskstorage.indexing.IndexQuery;
import com.thinkaurelius.titan.diskstorage.indexing.KeyInformation;
import com.thinkaurelius.titan.diskstorage.indexing.RawQuery;
-import com.thinkaurelius.titan.diskstorage.solr.transform.GeoToWktConverter;
import com.thinkaurelius.titan.diskstorage.util.DefaultTransaction;
import com.thinkaurelius.titan.graphdb.configuration.PreInitializeConfigOptions;
import com.thinkaurelius.titan.graphdb.database.serialize.AttributeUtil;
@@ -959,4 +958,19 @@ public class Solr5Index implements IndexProvider {
}
}
+ private static class GeoToWktConverter {
+ /**
+ * {@link com.thinkaurelius.titan.core.attribute.Geoshape} stores Points in the String format: point[X.0,Y.0].
+ * Solr needs it to be in Well-Known Text format: POINT(X.0 Y.0)
+ */
+ static String convertToWktString(Geoshape fieldValue) throws BackendException {
+ if (fieldValue.getType() == Geoshape.Type.POINT) {
+ Geoshape.Point point = fieldValue.getPoint();
+ return "POINT(" + point.getLongitude() + " " + point.getLatitude() + ")";
+ } else {
+ throw new PermanentBackendException("Cannot index " + fieldValue.getType());
+ }
+ }
+ }
+
}