Skip to content

Commit 624fd44

Browse files
authored
Deprecating old technology (#1845)
This commit deprecates spark 1.x, scala 2.10 on spark 2.x, hadoop 1, pig, and storm. Support will be removed for these things at a later date.
1 parent 3c805a9 commit 624fd44

File tree

9 files changed

+59
-7
lines changed

9 files changed

+59
-7
lines changed

docs/src/reference/asciidoc/appendix/breaking.adoc

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,40 @@ We've increased the `es.scroll.size` default from `50` to `1000`. If you deploy
2323
ES-hadoop in a low memory environment, consider lowering `es.scroll.size` to
2424
avoid issues.
2525

26-
==== Support for Scala 2.10 has been removed
26+
// end::notable-v8-breaking-changes[]
27+
28+
[[deprecations-8.0]]
29+
=== Deprecations in 8.0
30+
31+
The following functionality has been deprecated in {eh} 8.0 and will be removed
32+
in a future version. While this won’t have an immediate impact on your
33+
applications, we strongly encourage you take the described steps to update your
34+
code after upgrading to 8.0.
35+
36+
// tag::notable-v8-breaking-changes[]
37+
38+
==== Spark 1.x support is deprecated
39+
40+
Spark 1.x is no longer maintained. Spark 2 and Spark 3 are still supported.
41+
42+
==== Scala 2.10 support for Spark 2.x is deprecated
43+
44+
Spark deprecated support for Scala 2.10 in the Spark 2.0.0 release and removed it in the 2.3.0 release. Scala 2.11 and 2.12 are supported
45+
for Spark 2.x.
46+
47+
==== Hadoop 1.x support is deprecated
48+
49+
Hadoop 1.x is no longer maintained. Support for it has not been tested since {eh} 6.0. Support is now formally deprecated. Hadoop 2 and
50+
Hadoop 3 are supported.
51+
52+
==== Apache Pig support is deprecated
53+
54+
Apache Pig is no longer maintained.
55+
56+
==== Apache Storm support is deprecated
57+
58+
Apache Storm has not been a popular {es} integration.
2759

28-
Our compatibility artifacts no longer support Scala 2.10. Spark deprecated
29-
support for Scala 2.10 in the Spark 2.0.0 release.
3060
// end::notable-v8-breaking-changes[]
3161

3262
[[breaking-changes-7.0]]

docs/src/reference/asciidoc/core/intro/requirements.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ Hive version {hv-v}
8585
[[requirements-pig]]
8686
=== Apache Pig
8787

88-
Pig 0.10.0 or higher. We recommend using the latest release of Pig (currently {pg-v}).
88+
deprecated::[8.0,Support for Apache Pig in {eh} is deprecated.]
8989

90+
Pig 0.10.0 or higher. We recommend using the latest release of Pig (currently {pg-v}).
9091
In a similar fashion, Pig version can be discovered from its folder path or through the command-line:
9192

9293
["source","bash",subs="attributes"]
@@ -98,8 +99,9 @@ Apache Pig version {pg-v}
9899
[[requirements-spark]]
99100
=== Apache Spark
100101

101-
Spark 1.3.0 or higher. We recommend using the latest release of Spark (currently {sp-v}). As {eh} provides
102-
native integration (which is recommended) with {sp} it does not matter what binary one is using.
102+
deprecated::[8.0,Support for Spark 1.x in {eh} is deprecated.]
103+
104+
Spark 1.3.0 or higher. We recommend using the latest release of Spark (currently {sp-v}). As {eh} provides native integration (which is recommended) with {sp}, it does not matter what binary one is using.
103105
The same applies when using the Hadoop layer to integrate the two as {eh} supports the majority of
104106
Hadoop distributions out there.
105107

@@ -143,9 +145,10 @@ Note that Spark 1.0-1.2 are no longer supported (again due to backwards incompat
143145
[[requirements-storm]]
144146
=== Apache Storm
145147

148+
deprecated::[8.0,Support for Apache Storm in {eh} is deprecated.]
149+
146150
Storm 1.0.0 or higher. Do note that Storm 1.0.0 broke backwards compatibility with the previous versions (by changing the package name)
147151
however upgrading is easy and recommended. We recommend using the latest release of Storm (currently {st-v}).
148-
149152
One can discover the Storm version by looking at its folder or by invoking the command:
150153

151154
["source","bash",subs="attributes"]

mr/src/main/java/org/elasticsearch/hadoop/mr/EsInputFormat.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ public EsInputRecordReader<K, V> createRecordReader(InputSplit split, TaskAttemp
408408

409409
// Note: data written to the JobConf will be silently discarded
410410
@Override
411+
@Deprecated // Hadoop 1 support is deprecated
411412
public org.apache.hadoop.mapred.InputSplit[] getSplits(JobConf job, int numSplits) throws IOException {
412413

413414
Settings settings = HadoopSettingsManager.loadFrom(job);
@@ -424,6 +425,7 @@ public org.apache.hadoop.mapred.InputSplit[] getSplits(JobConf job, int numSplit
424425

425426
@SuppressWarnings("unchecked")
426427
@Override
428+
@Deprecated // Hadoop 1 support is deprecated
427429
public EsInputRecordReader<K, V> getRecordReader(org.apache.hadoop.mapred.InputSplit split, JobConf job, Reporter reporter) {
428430
return (EsInputRecordReader<K, V>) (isOutputAsJson(job) ? new JsonWritableEsInputRecordReader(split, job, reporter) : new WritableEsInputRecordReader(split, job, reporter));
429431
}

pig/src/main/java/org/elasticsearch/hadoop/pig/EsStorage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public EsStorage(String... configuration) {
118118
throw new EsHadoopIllegalArgumentException("Cannot parse options " + Arrays.toString(configuration), ex);
119119
}
120120
}
121+
log.warn("Support for Apache Pig has been deprecated and will be removed in a future release.");
121122
}
122123

123124
@Override

spark/sql-13/src/main/scala/org/elasticsearch/spark/sql/EsSparkSQL.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import org.elasticsearch.hadoop.util.ObjectUtils
3434
import org.elasticsearch.spark.cfg.SparkSettingsManager
3535
import org.elasticsearch.hadoop.rest.InitializationUtils
3636

37+
@deprecated(message="Support for Apache Spark 1 is deprecated. Use Spark 2 or 3.")
3738
object EsSparkSQL {
3839

3940
private val init = { ObjectUtils.loadClass("org.elasticsearch.spark.rdd.CompatUtils", classOf[ObjectUtils].getClassLoader) }

spark/sql-13/src/main/scala/org/elasticsearch/spark/sql/package.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ import org.elasticsearch.spark.sql.EsSparkSQL
2626

2727
package object sql {
2828

29+
@deprecated(message="Support for Apache Spark 1 is deprecated. Use Spark 2 or 3.")
2930
implicit def sqlContextFunctions(sc: SQLContext)= new SQLContextFunctions(sc)
3031

32+
@deprecated(message="Support for Apache Spark 1 is deprecated. Use Spark 2 or 3.")
3133
class SQLContextFunctions(sc: SQLContext) extends Serializable {
3234
def esDF() = EsSparkSQL.esDF(sc)
3335
def esDF(resource: String) = EsSparkSQL.esDF(sc, resource)
@@ -37,8 +39,10 @@ package object sql {
3739
def esDF(resource: String, query: String, cfg: scala.collection.Map[String, String]) = EsSparkSQL.esDF(sc, resource, query, cfg)
3840
}
3941

42+
@deprecated(message="Support for Apache Spark 1 is deprecated. Use Spark 2 or 3.")
4043
implicit def sparkDataFrameFunctions(df: DataFrame) = new SparkDataFrameFunctions(df)
4144

45+
@deprecated(message="Support for Apache Spark 1 is deprecated. Use Spark 2 or 3.")
4246
class SparkDataFrameFunctions(df: DataFrame) extends Serializable {
4347
def saveToEs(resource: String): Unit = { EsSparkSQL.saveToEs(df, resource) }
4448
def saveToEs(resource: String, cfg: scala.collection.Map[String, String]): Unit = { EsSparkSQL.saveToEs(df, resource, cfg) }

spark/sql-13/src/main/scala/org/elasticsearch/spark/streaming/EsSparkStreaming.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import org.elasticsearch.spark.rdd.EsSpark
2727

2828
import scala.collection.Map
2929

30+
@deprecated(message="Support for Apache Spark 1 is deprecated. Use Spark 2 or 3.")
3031
object EsSparkStreaming {
3132

3233
// Save methods

storm/src/main/java/org/elasticsearch/storm/EsBolt.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@
4646
import static org.elasticsearch.hadoop.cfg.ConfigurationOptions.*;
4747
import static org.elasticsearch.storm.cfg.StormConfigurationOptions.ES_STORM_BOLT_ACK;
4848

49+
/**
50+
* @deprecated Support for Apache Storm is deprecated and will be removed in the future. Consider moving to Spark or Mapreduce.
51+
*/
4952
@SuppressWarnings({ "rawtypes", "unchecked" })
53+
@Deprecated
5054
public class EsBolt implements IRichBolt {
5155

5256
private transient static Log log = LogFactory.getLog(EsBolt.class);
@@ -74,6 +78,7 @@ public EsBolt(String target, Map configuration) {
7478
}
7579

7680
private EsBolt(String target, Boolean writeAck, Map configuration) {
81+
log.warn("Support for Apache Storm has been deprecated and will be removed in a future release.");
7782
boltConfig.put(ES_RESOURCE_WRITE, target);
7883

7984
if (writeAck != null) {

storm/src/main/java/org/elasticsearch/storm/EsSpout.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@
4848

4949
import static org.elasticsearch.hadoop.cfg.ConfigurationOptions.*;
5050

51+
/**
52+
* @deprecated Support for Apache Storm is deprecated and will be removed in the future. Consider moving to Spark or Mapreduce.
53+
*/
5154
@SuppressWarnings({ "rawtypes", "unchecked" })
55+
@Deprecated
5256
public class EsSpout implements IRichSpout {
5357

5458
private transient static Log log = LogFactory.getLog(EsSpout.class);
@@ -82,6 +86,7 @@ public EsSpout(String target, Map configuration) {
8286
}
8387

8488
public EsSpout(String target, String query, Map configuration) {
89+
log.warn("Support for Apache Storm has been deprecated and will be removed in a future release.");
8590
if (configuration != null) {
8691
spoutConfig.putAll(configuration);
8792
}

0 commit comments

Comments
 (0)