Add cql driver support for champ 93/83993/1
authorKajur, Harish (vk250x) <vk250x@att.com>
Tue, 2 Apr 2019 18:04:19 +0000 (14:04 -0400)
committerKajur, Harish (vk250x) <vk250x@att.com>
Tue, 2 Apr 2019 18:04:24 +0000 (14:04 -0400)
Issue-ID: AAI-2308
Change-Id: I0a610eecb6b6dffe8df8f6458ee2184a763d343a
Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
champ-lib/champ-janus/pom.xml
champ-lib/champ-janus/src/main/java/org/onap/aai/champjanus/graph/impl/JanusChampGraphImpl.java
champ-service-deps-janus/pom.xml

index 6d714df..94da7d0 100644 (file)
@@ -89,6 +89,34 @@ limitations under the License.
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.janusgraph</groupId>
+            <artifactId>janusgraph-cql</artifactId>
+            <version>0.2.0</version>
+            <optional>true</optional>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>ch.qos.logback</groupId>
+                    <artifactId>logback-classic</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.tinkerpop</groupId>
+                    <artifactId>gremlin-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.tinkerpop</groupId>
+                    <artifactId>gremlin-groovy</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>dom4j</groupId>
+                    <artifactId>dom4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
 
         <dependency>
             <groupId>org.janusgraph</groupId>
index f150b44..ea90ce9 100644 (file)
@@ -50,6 +50,7 @@ import java.util.stream.StreamSupport;
 public final class JanusChampGraphImpl extends AbstractTinkerpopChampGraph {
   private static final Logger LOGGER = LoggerFactory.getLogger(JanusChampGraphImpl.class);
   private static final String JANUS_CASSANDRA_KEYSPACE = "storage.cassandra.keyspace";
+  private static final String JANUS_CQL_KEYSPACE = "storage.cql.keyspace";
   private static final String JANUS_HBASE_TABLE = "storage.hbase.table";
   private static final String JANUS_UNIQUE_SUFFIX = "graph.unique-instance-id-suffix";
   private static final ChampSchemaEnforcer SCHEMA_ENFORCER = new DefaultChampSchemaEnforcer();
@@ -87,8 +88,10 @@ public final class JanusChampGraphImpl extends AbstractTinkerpopChampGraph {
         "cassandrathrift".equals(storageBackend) ||
         "astyanax".equals(storageBackend) ||
         "embeddedcassandra".equals(storageBackend)) {
-       
-       janusGraphBuilder.set(JANUS_CASSANDRA_KEYSPACE, builder.graphName);
+
+      janusGraphBuilder.set(JANUS_CASSANDRA_KEYSPACE, builder.graphName);
+    } else if("cql".equals(storageBackend)){
+      janusGraphBuilder.set(JANUS_CQL_KEYSPACE, builder.graphName);
     } else if ("hbase".equals(storageBackend)) {
       janusGraphBuilder.set(JANUS_HBASE_TABLE, builder.graphName);
     } else if ("berkleyje".equals(storageBackend)) {
index 05f4977..1fa571f 100644 (file)
@@ -201,6 +201,74 @@ limitations under the License.
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.janusgraph</groupId>
+            <artifactId>janusgraph-cql</artifactId>
+            <version>0.2.0</version>
+            <optional>true</optional>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>ch.qos.logback</groupId>
+                    <artifactId>logback-classic</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.tinkerpop</groupId>
+                    <artifactId>gremlin-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.tinkerpop</groupId>
+                    <artifactId>gremlin-groovy</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>ch.qos.logback</groupId>
+                    <artifactId>logback-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpclient</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpcore</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>guava</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.validation</groupId>
+                    <artifactId>validation-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>xml-apis</groupId>
+                    <artifactId>xml-apis</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.hibernate</groupId>
+                    <artifactId>hibernate-validator</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>net.jpountz.lz4</groupId>
+                    <artifactId>lz4</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>dom4j</groupId>
+                    <artifactId>dom4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
 
         <dependency>
             <groupId>org.janusgraph</groupId>