move zen discovery to be the default discovery, and move jgroups to a plugin
This commit is contained in:
parent
265e2fb8bc
commit
6975f5d15a
|
@ -6,6 +6,7 @@
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/elasticsearch.iml" filepath="$PROJECT_DIR$/.idea/modules/elasticsearch.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/elasticsearch.iml" filepath="$PROJECT_DIR$/.idea/modules/elasticsearch.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/elasticsearch-root.iml" filepath="$PROJECT_DIR$/.idea/modules/elasticsearch-root.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/elasticsearch-root.iml" filepath="$PROJECT_DIR$/.idea/modules/elasticsearch-root.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-attachments.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-attachments.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-attachments.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-attachments.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-discovery-jgroups.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-discovery-jgroups.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-groovy.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-groovy.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-groovy.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-groovy.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-memcached.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-memcached.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules//plugin-memcached.iml" filepath="$PROJECT_DIR$/.idea/modules//plugin-memcached.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules//test-integration.iml" filepath="$PROJECT_DIR$/.idea/modules//test-integration.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules//test-integration.iml" filepath="$PROJECT_DIR$/.idea/modules//test-integration.iml" />
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
<orderEntry type="library" exported="" name="jackson" level="project" />
|
<orderEntry type="library" exported="" name="jackson" level="project" />
|
||||||
<orderEntry type="library" exported="" name="guice" level="project" />
|
<orderEntry type="library" exported="" name="guice" level="project" />
|
||||||
<orderEntry type="library" exported="" name="jline" level="project" />
|
<orderEntry type="library" exported="" name="jline" level="project" />
|
||||||
<orderEntry type="library" exported="" name="jgroups" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="netty" level="project" />
|
<orderEntry type="library" exported="" name="netty" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="testng" level="project" />
|
<orderEntry type="library" scope="TEST" name="testng" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="hamcrest" level="project" />
|
<orderEntry type="library" scope="TEST" name="hamcrest" level="project" />
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||||
|
<output url="file://$MODULE_DIR$/../../plugins/discovery/jgroups/build/classes/main" />
|
||||||
|
<output-test url="file://$MODULE_DIR$/../../plugins/discovery/jgroups/build/classes/test" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$/../../plugins/discovery/jgroups">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/../../plugins/discovery/jgroups/src/main/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/../../plugins/discovery/jgroups/src/test/java" isTestSource="true" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/../../plugins/discovery/jgroups/build" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="elasticsearch" />
|
||||||
|
<orderEntry type="library" name="jgroups" level="project" />
|
||||||
|
<orderEntry type="module" module-name="test-testng" scope="TEST" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="testng" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="hamcrest" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
|
|
|
@ -12,8 +12,5 @@ Some alternate data structures provided by high-scale-lib from
|
||||||
http://sourceforge.net/projects/high-scale-lib/.
|
http://sourceforge.net/projects/high-scale-lib/.
|
||||||
Written by Cliff Click and released as Public Domain.
|
Written by Cliff Click and released as Public Domain.
|
||||||
|
|
||||||
Logging abstraction provided by SLF4J (http://www.slf4j.org).
|
|
||||||
Copyright (c) 2004-2008 QOS.ch
|
|
||||||
|
|
||||||
Yaml support uses SnakeYaml Copyright of Andrey Somov under the
|
Yaml support uses SnakeYaml Copyright of Andrey Somov under the
|
||||||
Apache 2 License.
|
Apache 2 License.
|
||||||
|
|
|
@ -52,7 +52,6 @@ dependencies {
|
||||||
compile 'org.apache.lucene:lucene-queries:3.0.1'
|
compile 'org.apache.lucene:lucene-queries:3.0.1'
|
||||||
compile 'org.apache.lucene:lucene-fast-vector-highlighter:3.0.1'
|
compile 'org.apache.lucene:lucene-fast-vector-highlighter:3.0.1'
|
||||||
|
|
||||||
compile('jgroups:jgroups:2.9.0.GA') { transitive = false }
|
|
||||||
compile('org.jboss.netty:netty:3.1.5.GA') { transitive = false }
|
compile('org.jboss.netty:netty:3.1.5.GA') { transitive = false }
|
||||||
|
|
||||||
testCompile project(':test-testng')
|
testCompile project(':test-testng')
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.elasticsearch.discovery;
|
||||||
import com.google.inject.AbstractModule;
|
import com.google.inject.AbstractModule;
|
||||||
import com.google.inject.Module;
|
import com.google.inject.Module;
|
||||||
import org.elasticsearch.discovery.local.LocalDiscoveryModule;
|
import org.elasticsearch.discovery.local.LocalDiscoveryModule;
|
||||||
import org.elasticsearch.util.Classes;
|
import org.elasticsearch.discovery.zen.ZenDiscoveryModule;
|
||||||
import org.elasticsearch.util.settings.Settings;
|
import org.elasticsearch.util.settings.Settings;
|
||||||
|
|
||||||
import static org.elasticsearch.util.guice.ModulesFactory.*;
|
import static org.elasticsearch.util.guice.ModulesFactory.*;
|
||||||
|
@ -44,12 +44,7 @@ public class DiscoveryModule extends AbstractModule {
|
||||||
if (settings.getAsBoolean("node.local", false)) {
|
if (settings.getAsBoolean("node.local", false)) {
|
||||||
defaultDiscoveryModule = LocalDiscoveryModule.class;
|
defaultDiscoveryModule = LocalDiscoveryModule.class;
|
||||||
} else {
|
} else {
|
||||||
try {
|
defaultDiscoveryModule = ZenDiscoveryModule.class;
|
||||||
Classes.getDefaultClassLoader().loadClass("org.elasticsearch.discovery.jgroups.JgroupsDiscovery");
|
|
||||||
defaultDiscoveryModule = (Class<? extends Module>) Classes.getDefaultClassLoader().loadClass("org.elasticsearch.discovery.jgroups.JgroupsDiscoveryModule");
|
|
||||||
} catch (ClassNotFoundException e) {
|
|
||||||
defaultDiscoveryModule = LocalDiscoveryModule.class;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Class<? extends Module> moduleClass = settings.getAsClass("discovery.type", defaultDiscoveryModule, "org.elasticsearch.discovery.", "DiscoveryModule");
|
Class<? extends Module> moduleClass = settings.getAsClass("discovery.type", defaultDiscoveryModule, "org.elasticsearch.discovery.", "DiscoveryModule");
|
||||||
|
|
|
@ -0,0 +1,136 @@
|
||||||
|
dependsOn(':elasticsearch')
|
||||||
|
|
||||||
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'maven'
|
||||||
|
|
||||||
|
archivesBaseName = "elasticsearch-discovery-jgroups"
|
||||||
|
|
||||||
|
explodedDistDir = new File(distsDir, 'exploded')
|
||||||
|
|
||||||
|
manifest.mainAttributes("Implementation-Title": "ElasticSearch::Plugins::Discovery::Jgrorups", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr)
|
||||||
|
|
||||||
|
configurations.compile.transitive = true
|
||||||
|
configurations.testCompile.transitive = true
|
||||||
|
|
||||||
|
// no need to use the resource dir
|
||||||
|
sourceSets.main.resources.srcDirs 'src/main/java'
|
||||||
|
sourceSets.test.resources.srcDirs 'src/test/java'
|
||||||
|
|
||||||
|
// add the source files to the dist jar
|
||||||
|
jar {
|
||||||
|
from sourceSets.main.allJava
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
dists
|
||||||
|
distLib {
|
||||||
|
visible = false
|
||||||
|
transitive = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':elasticsearch')
|
||||||
|
compile('jgroups:jgroups:2.9.0.GA') { transitive = false }
|
||||||
|
|
||||||
|
testCompile project(':test-testng')
|
||||||
|
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||||
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
useTestNG()
|
||||||
|
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||||
|
suiteName = project.name
|
||||||
|
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||||
|
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||||
|
}
|
||||||
|
|
||||||
|
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||||
|
[explodedDistDir]*.mkdirs()
|
||||||
|
|
||||||
|
copy {
|
||||||
|
from configurations.distLib
|
||||||
|
into explodedDistDir
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove elasticsearch files (compile above adds the elasticsearch one)
|
||||||
|
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*.jar") }
|
||||||
|
|
||||||
|
copy {
|
||||||
|
from libsDir
|
||||||
|
into explodedDistDir
|
||||||
|
}
|
||||||
|
|
||||||
|
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-javadoc.jar") }
|
||||||
|
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-sources.jar") }
|
||||||
|
}
|
||||||
|
|
||||||
|
task zip(type: Zip, dependsOn: ['explodedDist']) {
|
||||||
|
from(explodedDistDir) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task release(dependsOn: [zip]) << {
|
||||||
|
ant.delete(dir: explodedDistDir)
|
||||||
|
copy {
|
||||||
|
from distsDir
|
||||||
|
into(new File(rootProject.distsDir, "plugins"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
deployerJars
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-2"
|
||||||
|
}
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.allSource
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||||
|
classifier = 'javadoc'
|
||||||
|
from javadoc.destinationDir
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives sourcesJar
|
||||||
|
archives javadocJar
|
||||||
|
}
|
||||||
|
|
||||||
|
uploadArchives {
|
||||||
|
repositories.mavenDeployer {
|
||||||
|
configuration = configurations.deployerJars
|
||||||
|
repository(url: rootProject.mavenRepoUrl) {
|
||||||
|
authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
|
||||||
|
}
|
||||||
|
snapshotRepository(url: rootProject.mavenSnapshotRepoUrl) {
|
||||||
|
authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
|
||||||
|
}
|
||||||
|
|
||||||
|
pom.project {
|
||||||
|
inceptionYear '2009'
|
||||||
|
name 'elasticsearch-plugins-disocvery-jgroups'
|
||||||
|
description 'Memcacehd Plugin for ElasticSearch'
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name 'The Apache Software License, Version 2.0'
|
||||||
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
|
distribution 'repo'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
connection 'git://github.com/elasticsearch/elasticsearch.git'
|
||||||
|
developerConnection 'git@github.com:elasticsearch/elasticsearch.git'
|
||||||
|
url 'http://github.com/elasticsearch/elasticsearch'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pom.whenConfigured {pom ->
|
||||||
|
pom.dependencies = pom.dependencies.findAll {dep -> dep.scope != 'test' } // removes the test scoped ones
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,6 +9,7 @@ include 'benchmark-micro'
|
||||||
include 'plugins-attachments'
|
include 'plugins-attachments'
|
||||||
include 'plugins-groovy'
|
include 'plugins-groovy'
|
||||||
include 'plugins-memcached'
|
include 'plugins-memcached'
|
||||||
|
include 'plugins-discovery-jgroups'
|
||||||
|
|
||||||
rootProject.name = 'elasticsearch-root'
|
rootProject.name = 'elasticsearch-root'
|
||||||
rootProject.children.each {project ->
|
rootProject.children.each {project ->
|
||||||
|
|
Loading…
Reference in New Issue