From ade96356c13424bc6fe3ec53de6128fa641231c5 Mon Sep 17 00:00:00 2001 From: mallocator Date: Thu, 7 Mar 2013 11:18:19 -0800 Subject: [PATCH] - Stub implementation putting all classes in place without functionality --- pom.xml | 134 +++++++++++------- .../river/hadoop/HadoopRiverPlugin.java | 24 ++++ .../river/hadoop/HadoopRiver.java | 28 ++++ .../river/hadoop/HadoopRiverModule.java | 12 ++ src/main/resources/es-plugin.properties | 1 + 5 files changed, 151 insertions(+), 48 deletions(-) create mode 100644 src/main/java/org/elasticsearch/plugin/river/hadoop/HadoopRiverPlugin.java create mode 100644 src/main/java/org/elasticsearch/river/hadoop/HadoopRiver.java create mode 100644 src/main/java/org/elasticsearch/river/hadoop/HadoopRiverModule.java create mode 100644 src/main/resources/es-plugin.properties diff --git a/pom.xml b/pom.xml index ef6f219..548a24d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,55 +1,93 @@ - 4.0.0 + Elastichsearch Hadoop River + 4.0.0 + org.elasticsearch + rivers-hadoop + jar + Hadoop River for ElasticSearch + 2013 + 1.0.0-SNAPSHOT - net.pyxzl - hadoop-river - 0.0.1-SNAPSHOT - jar + + UTF-8 + 0.20.5 + 1.1.1 - hadoop-river - http://maven.apache.org + 2.4 + 2.4 + 3.0 + - - UTF-8 - + + scm:git://github.com/mallocator/Elasticsearch-MySQL-River.git + scm:git://github.com/mallocator/Elasticsearch-MySQL-River.git + scm:git://github.com/mallocator/Elasticsearch-MySQL-River.git + - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - - - - - - - junit - junit - 4.8.1 - test - - - org.mockito - mockito-all - 1.8.5 - test - - - org.hamcrest - hamcrest-integration - 1.2.1 - - - net.avh4.util - imagecomparison - 0.0.2 - test - - + + + org.elasticsearch + elasticsearch + ${elasticsearch.version} + provided + + + org.apache.hadoop + hadoop-core + ${hadoop.version} + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${mavenCompilerPlugin} + + 1.6 + 1.6 + -Xlint + true + true + + + + org.apache.maven.plugins + maven-jar-plugin + ${mavenJarPluginVersion} + + + + true + + + ${project.artifactId} + ${maven.build.timestamp} + ${buildNumber} + + + + + + maven-assembly-plugin + ${mavenAssemblyPlugin} + + false + ${project.build.directory}/releases/ + + ${basedir}/src/main/assemblies/plugin.xml + + + + + package + + single + + + + + + diff --git a/src/main/java/org/elasticsearch/plugin/river/hadoop/HadoopRiverPlugin.java b/src/main/java/org/elasticsearch/plugin/river/hadoop/HadoopRiverPlugin.java new file mode 100644 index 0000000..1b91d6d --- /dev/null +++ b/src/main/java/org/elasticsearch/plugin/river/hadoop/HadoopRiverPlugin.java @@ -0,0 +1,24 @@ +package org.elasticsearch.plugin.river.hadoop; + +import org.elasticsearch.common.inject.Inject; +import org.elasticsearch.plugins.AbstractPlugin; +import org.elasticsearch.river.RiversModule; +import org.elasticsearch.river.hadoop.HadoopRiverModule; + +public class HadoopRiverPlugin extends AbstractPlugin { + + @Inject + public HadoopRiverPlugin() {} + + public String name() { + return "river-hadoop"; + } + + public String description() { + return "River MySQL Plugin"; + } + + public void onModule(final RiversModule module) { + module.registerRiver("hadoop", HadoopRiverModule.class); + } +} diff --git a/src/main/java/org/elasticsearch/river/hadoop/HadoopRiver.java b/src/main/java/org/elasticsearch/river/hadoop/HadoopRiver.java new file mode 100644 index 0000000..59eb4d0 --- /dev/null +++ b/src/main/java/org/elasticsearch/river/hadoop/HadoopRiver.java @@ -0,0 +1,28 @@ +package org.elasticsearch.river.hadoop; + +import org.elasticsearch.common.inject.Inject; +import org.elasticsearch.river.AbstractRiverComponent; +import org.elasticsearch.river.River; +import org.elasticsearch.river.RiverName; +import org.elasticsearch.river.RiverSettings; + +public class HadoopRiver extends AbstractRiverComponent implements River { + + @Inject + public HadoopRiver(RiverName riverName, RiverSettings settings) { + super(riverName, settings); + // TODO Auto-generated constructor stub + } + + @Override + public void start() { + // TODO Auto-generated method stub + + } + + @Override + public void close() { + // TODO Auto-generated method stub + + } +} \ No newline at end of file diff --git a/src/main/java/org/elasticsearch/river/hadoop/HadoopRiverModule.java b/src/main/java/org/elasticsearch/river/hadoop/HadoopRiverModule.java new file mode 100644 index 0000000..db83a0c --- /dev/null +++ b/src/main/java/org/elasticsearch/river/hadoop/HadoopRiverModule.java @@ -0,0 +1,12 @@ +package org.elasticsearch.river.hadoop; + +import org.elasticsearch.common.inject.AbstractModule; +import org.elasticsearch.river.River; + +public class HadoopRiverModule extends AbstractModule { + + @Override + protected void configure() { + bind(River.class).to(HadoopRiver.class).asEagerSingleton(); + } +} diff --git a/src/main/resources/es-plugin.properties b/src/main/resources/es-plugin.properties new file mode 100644 index 0000000..35276f7 --- /dev/null +++ b/src/main/resources/es-plugin.properties @@ -0,0 +1 @@ +plugin=org.elasticsearch.plugin.river.hadoop.HadoopRiverPlugin \ No newline at end of file