org.elasticsearch.river.RiversModule Java Examples

The following examples show how to use org.elasticsearch.river.RiversModule. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KafkaRiverPlugin.java    From elasticsearch-river-kafka with Apache License 2.0 6 votes vote down vote up
public void onModule(RiversModule module) {
        module.registerRiver("kafka", KafkaRiverModule.class);

        // Type "kafka" must always be the same value which you provide as a type when creating the river:
        //Example:

//        curl -XPUT 'localhost:9200/_river/my_kafka_river/_meta' -d '{
//        "type" : "kafka",
//                "kafka" : {
//                "brokerHost" : "localhost",
//                    "brokerPort" : 9092,
//                    "topic" : "dummy",
//                    "partition" : 0
//
//                }
//        }'
    }
 
Example #2
Source File: Neo4jRiverPluginTest.java    From elasticsearch-river-neo4j with Apache License 2.0 5 votes vote down vote up
@Test
public void thatModuleIsRegistered() {
    RiversModule module = mock(RiversModule.class);
    Neo4jRiverPlugin plugin = new Neo4jRiverPlugin();
    assertEquals("river-neo4j", plugin.name());
    plugin.onModule(module);
    verify(module).registerRiver("neo4j", Neo4jRiverModule.class);
}
 
Example #3
Source File: S3RiverPlugin.java    From es-amazon-s3-river with Apache License 2.0 5 votes vote down vote up
@Override
public void processModule(Module module){
   if (module instanceof RiversModule){
      ((RiversModule) module).registerRiver("amazon-s3", S3RiverModule.class);
   }
   if (module instanceof RestModule) {
      ((RestModule) module).addRestAction(S3ManageAction.class);
   }
}
 
Example #4
Source File: GitHubRiverPlugin.java    From elasticsearch-river-github with Apache License 2.0 4 votes vote down vote up
public void onModule(RiversModule module) {
    module.registerRiver("github", GitHubRiverModule.class);
}
 
Example #5
Source File: KafkaRiverPlugin.java    From elasticsearch-river-kafka with Apache License 2.0 4 votes vote down vote up
public void onModule(RiversModule module) {
    module.registerRiver("kafka", KafkaRiverModule.class);
}
 
Example #6
Source File: Neo4jRiverPlugin.java    From elasticsearch-river-neo4j with Apache License 2.0 4 votes vote down vote up
public void onModule(RiversModule module) {
    module.registerRiver("neo4j", Neo4jRiverModule.class);
}
 
Example #7
Source File: HBaseRiverPlugin.java    From Elasticsearch-HBase-River with Apache License 2.0 2 votes vote down vote up
/**
 * Registers the HBaseRiverModule as "hbase" river.
 * 
 * @param module
 */
public void onModule(final RiversModule module) {
	module.registerRiver("hbase", HBaseRiverModule.class);
}
 
Example #8
Source File: CassandraRiverPlugin.java    From cassandra-river with Apache License 2.0 2 votes vote down vote up
/**
 * Registers the {@link CassandraRiverModule}
 * @param module the elasticsearch module used to handle rivers
 */
public void onModule(RiversModule module) {
    module.registerRiver("cassandra", CassandraRiverModule.class);
}