atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [43/50] [abbrv] incubator-atlas git commit: fixed - boolean backed index is not supported
Date Wed, 13 May 2015 21:28:24 GMT
fixed - boolean backed index is not supported


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

Branch: refs/remotes/origin/master
Commit: 2c65ac46bb19dc873d1e616d96a4a6e9feaa930a
Parents: 01ee72a
Author: Shwetha GS <sshivalingamurthy@hortonworks.com>
Authored: Thu May 7 17:08:45 2015 +0530
Committer: Shwetha GS <sshivalingamurthy@hortonworks.com>
Committed: Thu May 7 17:08:45 2015 +0530

----------------------------------------------------------------------
 addons/hive-bridge/src/site/twiki/Bridge-Hive.twiki    |  2 +-
 .../discovery/graph/GraphBackedDiscoveryService.java   |  2 +-
 .../repository/graph/GraphBackedSearchIndexer.java     | 13 ++++++++++---
 .../metadata/web/resources/EntityJerseyResourceIT.java |  5 ++++-
 4 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/2c65ac46/addons/hive-bridge/src/site/twiki/Bridge-Hive.twiki
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/site/twiki/Bridge-Hive.twiki b/addons/hive-bridge/src/site/twiki/Bridge-Hive.twiki
index 5782b86..0632e20 100644
--- a/addons/hive-bridge/src/site/twiki/Bridge-Hive.twiki
+++ b/addons/hive-bridge/src/site/twiki/Bridge-Hive.twiki
@@ -31,7 +31,7 @@ hive conf directory:
 </property>
 </verbatim>
 
-Usage: <dgi package>/bin/import-hive.sh
+Usage: <dgi package>/bin/import-hive.sh. The logs are in <dgi package>/logs/import-hive.log
 
 
 ---++ Hive Hook

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/2c65ac46/repository/src/main/java/org/apache/hadoop/metadata/discovery/graph/GraphBackedDiscoveryService.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/hadoop/metadata/discovery/graph/GraphBackedDiscoveryService.java
b/repository/src/main/java/org/apache/hadoop/metadata/discovery/graph/GraphBackedDiscoveryService.java
index de99be4..0162c57 100755
--- a/repository/src/main/java/org/apache/hadoop/metadata/discovery/graph/GraphBackedDiscoveryService.java
+++ b/repository/src/main/java/org/apache/hadoop/metadata/discovery/graph/GraphBackedDiscoveryService.java
@@ -73,7 +73,7 @@ public class GraphBackedDiscoveryService implements DiscoveryService {
         this.graphPersistenceStrategy = new DefaultGraphPersistenceStrategy(metadataRepository);
     }
 
-    //Refer http://s3.thinkaurelius.com/docs/titan/0.5.0/index-backends.html for indexed
query
+    //Refer http://s3.thinkaurelius.com/docs/titan/0.5.4/index-backends.html for indexed
query
     //http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query
     // .html#query-string-syntax for query syntax
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/2c65ac46/repository/src/main/java/org/apache/hadoop/metadata/repository/graph/GraphBackedSearchIndexer.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/hadoop/metadata/repository/graph/GraphBackedSearchIndexer.java
b/repository/src/main/java/org/apache/hadoop/metadata/repository/graph/GraphBackedSearchIndexer.java
index 721786c..b6b980a 100755
--- a/repository/src/main/java/org/apache/hadoop/metadata/repository/graph/GraphBackedSearchIndexer.java
+++ b/repository/src/main/java/org/apache/hadoop/metadata/repository/graph/GraphBackedSearchIndexer.java
@@ -314,9 +314,16 @@ public class GraphBackedSearchIndexer implements SearchIndexer {
                     .dataType(propertyClass)
                     .make();
 
-            TitanGraphIndex vertexIndex = management.getGraphIndex(Constants.VERTEX_INDEX);
-            management.addIndexKey(vertexIndex, propertyKey);
-            management.commit();
+            if (propertyClass == Boolean.class) {
+                //Use standard index as backing index only supports string, int and geo types
+                management.buildIndex(propertyName, Vertex.class).addKey(propertyKey).buildCompositeIndex();
+                management.commit();
+            } else {
+                //Use backing index
+                TitanGraphIndex vertexIndex = management.getGraphIndex(Constants.VERTEX_INDEX);
+                management.addIndexKey(vertexIndex, propertyKey);
+                management.commit();
+            }
             LOG.info("Created mixed vertex index for property {}", propertyName);
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/2c65ac46/webapp/src/test/java/org/apache/hadoop/metadata/web/resources/EntityJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/hadoop/metadata/web/resources/EntityJerseyResourceIT.java
b/webapp/src/test/java/org/apache/hadoop/metadata/web/resources/EntityJerseyResourceIT.java
index 024e967..8064fc3 100755
--- a/webapp/src/test/java/org/apache/hadoop/metadata/web/resources/EntityJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/hadoop/metadata/web/resources/EntityJerseyResourceIT.java
@@ -410,7 +410,9 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
                         new AttributeDefinition("serde2",
                                 "serdeType", Multiplicity.REQUIRED, false, null),
                         new AttributeDefinition("database",
-                                DATABASE_TYPE, Multiplicity.REQUIRED, true, null));
+                                DATABASE_TYPE, Multiplicity.REQUIRED, true, null),
+                        new AttributeDefinition("compressed",
+                                DataTypes.BOOLEAN_TYPE.getName(), Multiplicity.OPTIONAL,
true, null));
 
         HierarchicalTypeDefinition<TraitType> classificationTraitDefinition =
                 TypesUtil.createTraitTypeDef("classification",
@@ -451,6 +453,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
         tableInstance.set("level", 2);
         tableInstance.set("tableType", 1); // enum
         tableInstance.set("database", databaseInstance);
+        tableInstance.set("compressed", false);
 
         Struct traitInstance = (Struct) tableInstance.getTrait("classification");
         traitInstance.set("tag", "foundation_etl");


Mime
View raw message