IGNITE-7092 - Deprecated embedded mode in IgniteRDD
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4dbd6c58 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4dbd6c58 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4dbd6c58 Branch: refs/heads/ignite-zk Commit: 4dbd6c5829a34232934d8f5959cf38639f33bdcb Parents: e3bbc98 Author: Valentin Kulichenko <[email protected]> Authored: Tue Dec 26 15:11:07 2017 -0800 Committer: Valentin Kulichenko <[email protected]> Committed: Tue Dec 26 15:11:07 2017 -0800 ---------------------------------------------------------------------- .../src/main/scala/org/apache/ignite/spark/IgniteContext.scala | 5 +++++ .../main/scala/org/apache/ignite/spark/JavaIgniteContext.scala | 2 ++ 2 files changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/4dbd6c58/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala ---------------------------------------------------------------------- diff --git a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala index b62e4d8..edbf2be 100644 --- a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala +++ b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala @@ -34,6 +34,7 @@ import org.apache.log4j.Logger class IgniteContext( @transient val sparkContext: SparkContext, cfgF: () â IgniteConfiguration, + @deprecated("Embedded mode is deprecated and will be discontinued. Consider using standalone mode instead.") standalone: Boolean = true ) extends Serializable { private val cfgClo = new Once(cfgF) @@ -41,6 +42,8 @@ class IgniteContext( private val igniteHome = IgniteUtils.getIgniteHome if (!standalone) { + Logging.log.warn("Embedded mode is deprecated and will be discontinued. Consider using standalone mode instead.") + // Get required number of executors with default equals to number of available executors. val workers = sparkContext.getConf.getInt("spark.executor.instances", sparkContext.getExecutorStorageStatus.length) @@ -62,7 +65,9 @@ class IgniteContext( * * @param sc Spark context. * @param springUrl Spring configuration path. + * @param standalone Standalone or embedded mode. */ + @deprecated("Embedded mode is deprecated and will be discontinued. Consider using standalone mode instead.") def this( sc: SparkContext, springUrl: String, http://git-wip-us.apache.org/repos/asf/ignite/blob/4dbd6c58/modules/spark/src/main/scala/org/apache/ignite/spark/JavaIgniteContext.scala ---------------------------------------------------------------------- diff --git a/modules/spark/src/main/scala/org/apache/ignite/spark/JavaIgniteContext.scala b/modules/spark/src/main/scala/org/apache/ignite/spark/JavaIgniteContext.scala index d8a521b..fa38631 100644 --- a/modules/spark/src/main/scala/org/apache/ignite/spark/JavaIgniteContext.scala +++ b/modules/spark/src/main/scala/org/apache/ignite/spark/JavaIgniteContext.scala @@ -36,6 +36,7 @@ import scala.reflect.ClassTag class JavaIgniteContext[K, V]( @transient val sc: JavaSparkContext, val cfgF: IgniteOutClosure[IgniteConfiguration], + @deprecated("Embedded mode is deprecated and will be discontinued. Consider using standalone mode instead.") standalone: Boolean = true ) extends Serializable { @@ -51,6 +52,7 @@ class JavaIgniteContext[K, V]( }) } + @deprecated("Embedded mode is deprecated and will be discontinued. Consider using standalone mode instead.") def this(sc: JavaSparkContext, springUrl: String, standalone: Boolean) { this(sc, new IgniteOutClosure[IgniteConfiguration] { override def apply() = IgnitionEx.loadConfiguration(springUrl).get1()
