Deprecate rivers

* In code, we mark `River`, `AbstractRiverComponent`, `RiverComponent` and `RiverName` classes as deprecated
* We log that information when a cluster is still using it
* We add this information in the plugins list as well
This commit is contained in:
David Pilato 2015-04-09 14:11:49 +02:00
parent fae124103a
commit 88ee7a5dca
6 changed files with 12 additions and 4 deletions

View File

@ -217,6 +217,8 @@ You can disable that check using `plugins.check_lucene: false`.
[[river]]
==== River Plugins
deprecated[1.5.0,Rivers have been deprecated. See https://www.elastic.co/blog/deprecating_rivers for more details]
.Supported by Elasticsearch
* https://github.com/elasticsearch/elasticsearch-river-couchdb[CouchDB River Plugin]
* https://github.com/elasticsearch/elasticsearch-river-rabbitmq[RabbitMQ River Plugin]

View File

@ -23,8 +23,9 @@ import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
/**
*
* @deprecated See blog post https://www.elastic.co/blog/deprecating_rivers
*/
@Deprecated
public class AbstractRiverComponent implements RiverComponent {
protected final ESLogger logger;
@ -48,4 +49,4 @@ public class AbstractRiverComponent implements RiverComponent {
public String nodeName() {
return settings.globalSettings().get("name", "");
}
}
}

View File

@ -22,7 +22,9 @@ package org.elasticsearch.river;
/**
* Allows to import data into elasticsearch via plugin
* Gets allocated on a node and eventually automatically re-allocated if needed
* @deprecated See blog post https://www.elastic.co/blog/deprecating_rivers
*/
@Deprecated
public interface River extends RiverComponent {
/**

View File

@ -20,8 +20,9 @@
package org.elasticsearch.river;
/**
*
* @deprecated See blog post https://www.elastic.co/blog/deprecating_rivers
*/
@Deprecated
public interface RiverComponent {
RiverName riverName();

View File

@ -22,8 +22,9 @@ package org.elasticsearch.river;
import java.io.Serializable;
/**
*
* @deprecated See blog post https://www.elastic.co/blog/deprecating_rivers
*/
@Deprecated
public class RiverName implements Serializable {
private final String type;

View File

@ -126,6 +126,7 @@ public class RiversService extends AbstractLifecycleComponent<RiversService> {
return;
}
logger.info("rivers have been deprecated. Read https://www.elastic.co/blog/deprecating_rivers");
logger.debug("creating river [{}][{}]", riverName.type(), riverName.name());
try {