Skip to content

Instantly share code, notes, and snippets.

@ibrusic
Created February 21, 2011 23:07
Show Gist options
  • Save ibrusic/837883 to your computer and use it in GitHub Desktop.
Save ibrusic/837883 to your computer and use it in GitHub Desktop.
class SimpleWebsocketRiverPlugin @Inject() extends AbstractPlugin {
def name() = {
"river-simplewebsocket";
}
def description() = {
"River Simple Websocket Plugin";
}
}
class SimpleWebsocketRiverModule extends AbstractModule {
override def configure() = {
bind(classOf[River]).to(classOf[SimpleWebsocketRiver]).asEagerSingleton()
}
}
class SimpleWebsocketRiver @Inject()(riverName: RiverName, riverSettings: RiverSettings, client: Client) extends AbstractRiverComponent(riverName, riverSettings) with River
/*
curl -XPUT localhost:9200/_river/test_river/_meta -d '
{
"type" : "simplewebsocket"
}
'
*/
@ibrusic
Copy link
Author

ibrusic commented Feb 22, 2011

es-plugin.properties
plugin=plugin.SimpleWebsocketRiverPlugin

curl -XPUT localhost:9200/_river/test_river/_meta -d '
{
"type" : "simplewebsocket"
}

[2011-02-21 18:34:00,918][WARN ][river ] [Horrocks, Ned] failed to create river [river-simplewebsocket][meetup]
org.elasticsearch.common.settings.NoClassSettingsException: Failed to load class with value [river-simplewebsocket]
at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:77)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment