Skip to content

Commit

Permalink
Remove references to client-only in prop files
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Lohnes <krlohnes@us.ibm.com>
  • Loading branch information
Keith Lohnes committed Mar 21, 2017
1 parent 32c0391 commit bbd58a4
Show file tree
Hide file tree
Showing 63 changed files with 5,471 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@

#JANUSGRAPHCFG{index.search.directory=../db/es}

#JANUSGRAPHCFG{index.search.elasticsearch.client-only=false}

#JANUSGRAPHCFG{index.search.elasticsearch.local-mode=true}
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@

#JANUSGRAPHCFG{index.search.directory=../db/es}

#JANUSGRAPHCFG{index.search.elasticsearch.client-only=false}

#JANUSGRAPHCFG{index.search.elasticsearch.local-mode=true}

# Or connect to an already-running ES process on localhost
#index.search.backend=elasticsearch
#index.search.hostname=127.0.0.1
#index.search.elasticsearch.client-only=true
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@

#JANUSGRAPHCFG{index.search.hostname=127.0.0.1}

#JANUSGRAPHCFG{index.search.elasticsearch.client-only=true}

# Or start ES inside the JanusGraph JVM
#index.search.backend=elasticsearch
#index.search.directory=../db/es
#index.search.elasticsearch.client-only=false
#index.search.elasticsearch.local-mode=true
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
#JANUSGRAPHCFG{index.search.backend=elasticsearch}

#JANUSGRAPHCFG{index.search.hostname=127.0.0.1}

#JANUSGRAPHCFG{index.search.elasticsearch.client-only=true}
Original file line number Diff line number Diff line change
Expand Up @@ -111,23 +111,7 @@ index.search.backend=elasticsearch
# Mutability: MASKABLE
index.search.hostname=127.0.0.1

# The Elasticsearch node.client option is set to this boolean value, and
# the Elasticsearch node.data option is set to the negation of this value.
# True creates a thin client which holds no data. False creates a regular
# Elasticsearch cluster node that may store data.
#
# Default: true
# Data Type: Boolean
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in JanusGraph's
# storage backend. After starting the database for the first time, this
# file's copy of this setting is ignored. Use JanusGraph's Management System
# to read or modify this value after bootstrapping.
index.search.elasticsearch.client-only=true

# Or start ES inside the JanusGraph JVM
#index.search.backend=elasticsearch
#index.search.directory=db/es
#index.search.elasticsearch.client-only=false
#index.search.elasticsearch.local-mode=true
File renamed without changes.
2 changes: 2 additions & 0 deletions janusgraph-es-parent/janusgraph-es-1x-test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/bin
/config
272 changes: 272 additions & 0 deletions janusgraph-es-parent/janusgraph-es-1x-test/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
<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.janusgraph</groupId>
<artifactId>janusgraph-es-parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>janusgraph-es-1x-test</artifactId>
<properties>
<top.level.basedir>${basedir}/../..</top.level.basedir>
</properties>
<profiles>
<profile>
<id>es-1</id>
<dependencies>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>${lucene.version}</version>
<scope>test</scope>
</dependency>
<!--apprently order matters here for these next two-->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
<type>test-jar</type>
</dependency>
</dependencies>
</profile>
<profile>
<id>es-2+</id>
<dependencies>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>4.10.4</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>4.10.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId>
<version>2.1.14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.7.5</version>
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.7.5</version>
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-test</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-es-core-test</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-berkeleyje</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-berkeleyje</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-cassandra</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-cassandra</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>${antlr.version}</version>
</dependency>
<!--Bit of a hack here. Jest relies on a later version of gson. This
shoule fine though. -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>filter-es-config</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/config</outputDirectory>
<delimiters>
<delimiter>$MAVEN{*}</delimiter>
</delimiters>
<resources>
<resource>
<directory>${project.basedir}/src/test/config</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>filter-cassandra-murmur-config</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/cassandra/conf/localhost-murmur</outputDirectory>
<filters>
<filter>${top.level.basedir}/janusgraph-cassandra/config/cassandra-filters/localhost-murmur.properties</filter>
</filters>
<resources>
<resource>
<directory>${top.level.basedir}/janusgraph-cassandra/config/cassandra</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-es-files</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>bin/</directory>
</fileset>
<fileset>
<directory>config/</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>default-test</id>
<configuration>
<argLine>-Dtest.cassandra.confdir=${project.build.directory}/cassandra/conf/localhost-murmur -Dtest.cassandra.datadir=${project.build.directory}/cassandra/data/localhost-murmur</argLine>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>build-es-classpath</id>
<phase>process-test-resources</phase>
<goals>
<goal>build-classpath</goal>
</goals>
<configuration>
<outputFile>${project.build.directory}/es_classpath.txt</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2017 JanusGraph Authors
//
//
// Licensed 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
Expand All @@ -11,35 +11,50 @@
// 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.janusgraph.diskstorage.es;

import java.util.concurrent.ExecutionException;

import org.elasticsearch.test.ElasticsearchIntegrationTest;
import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;

import org.janusgraph.CassandraStorageSetup;
import org.janusgraph.StorageSetup;
import org.janusgraph.diskstorage.configuration.ModifiableConfiguration;
import org.janusgraph.diskstorage.configuration.WriteConfiguration;
import org.janusgraph.diskstorage.BackendException;
import org.janusgraph.diskstorage.es.ThriftEsShim;
import org.janusgraph.testcategory.BrittleTests;
import org.janusgraph.testutil.TestGraphConfigs;
import org.janusgraph.graphdb.JanusGraphIndexTest;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.janusgraph.CassandraStorageSetup.*;
import static org.janusgraph.diskstorage.es.ElasticSearchIndex.LOCAL_MODE;
import static org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.INDEX_BACKEND;
import static org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.INDEX_DIRECTORY;

public class ThriftElasticsearchTest extends JanusGraphIndexTest {

public static final String ES_HOME = "../../janusgraph-es-parent/janusgraph-es";

public ThriftElasticsearchTest() {
super(true, true, true);
}

@BeforeClass
public static void beforeThriftTest() {
CassandraStorageSetup.startCleanEmbedded();
new ElasticsearchRunner(ES_HOME).start();
}

@Override
public WriteConfiguration getConfiguration() {
ModifiableConfiguration config =
getCassandraThriftConfiguration(ThriftElasticsearchTest.class.getName());
//Add index
config.set(INDEX_BACKEND,"elasticsearch",INDEX);
config.set(LOCAL_MODE,true,INDEX);
config.set(INDEX_DIRECTORY, StorageSetup.getHomeDir("es"),INDEX);
return config.getConfiguration();
}
Expand Down
Loading

0 comments on commit bbd58a4

Please sign in to comment.