Return-Path: X-Original-To: apmail-spark-commits-archive@minotaur.apache.org Delivered-To: apmail-spark-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 22E6918A6C for ; Sat, 30 Apr 2016 15:06:18 +0000 (UTC) Received: (qmail 15945 invoked by uid 500); 30 Apr 2016 15:06:18 -0000 Delivered-To: apmail-spark-commits-archive@spark.apache.org Received: (qmail 15916 invoked by uid 500); 30 Apr 2016 15:06:18 -0000 Mailing-List: contact commits-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@spark.apache.org Received: (qmail 15906 invoked by uid 99); 30 Apr 2016 15:06:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Apr 2016 15:06:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E51A1DFE04; Sat, 30 Apr 2016 15:06:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: srowen@apache.org To: commits@spark.apache.org Message-Id: <4f95aefe1a7649f0921a1b7dd83e7428@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: spark git commit: [SPARK-14952][CORE][ML] Remove methods that were deprecated in 1.6.0 Date: Sat, 30 Apr 2016 15:06:17 +0000 (UTC) Repository: spark Updated Branches: refs/heads/master 0847fe4eb -> e5fb78baf [SPARK-14952][CORE][ML] Remove methods that were deprecated in 1.6.0 #### What changes were proposed in this pull request? This PR removes three methods the were deprecated in 1.6.0: - `PortableDataStream.close()` - `LinearRegression.weights` - `LogisticRegression.weights` The rationale for doing this is that the impact is small and that Spark 2.0 is a major release. #### How was this patch tested? Compilation succeded. Author: Herman van Hovell Closes #12732 from hvanhovell/SPARK-14952. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e5fb78ba Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e5fb78ba Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e5fb78ba Branch: refs/heads/master Commit: e5fb78baf9a6014b6dd02cf9f528d069732aafca Parents: 0847fe4 Author: Herman van Hovell Authored: Sat Apr 30 16:06:20 2016 +0100 Committer: Sean Owen Committed: Sat Apr 30 16:06:20 2016 +0100 ---------------------------------------------------------------------- .../scala/org/apache/spark/input/PortableDataStream.scala | 9 --------- .../spark/ml/classification/LogisticRegression.scala | 3 --- .../org/apache/spark/ml/regression/LinearRegression.scala | 3 --- project/MimaExcludes.scala | 5 +++++ python/pyspark/ml/classification.py | 10 ---------- python/pyspark/ml/regression.py | 9 --------- 6 files changed, 5 insertions(+), 34 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/e5fb78ba/core/src/main/scala/org/apache/spark/input/PortableDataStream.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/input/PortableDataStream.scala b/core/src/main/scala/org/apache/spark/input/PortableDataStream.scala index 18cb763..f66510b 100644 --- a/core/src/main/scala/org/apache/spark/input/PortableDataStream.scala +++ b/core/src/main/scala/org/apache/spark/input/PortableDataStream.scala @@ -185,15 +185,6 @@ class PortableDataStream( } } - /** - * Closing the PortableDataStream is not needed anymore. The user either can use the - * PortableDataStream to get a DataInputStream (which the user needs to close after usage), - * or a byte array. - */ - @deprecated("Closing the PortableDataStream is not needed anymore.", "1.6.0") - def close(): Unit = { - } - def getPath(): String = path } http://git-wip-us.apache.org/repos/asf/spark/blob/e5fb78ba/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala ---------------------------------------------------------------------- diff --git a/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala b/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala index 8cd7ee4..717e93c 100644 --- a/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala +++ b/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala @@ -480,9 +480,6 @@ class LogisticRegressionModel private[spark] ( extends ProbabilisticClassificationModel[Vector, LogisticRegressionModel] with LogisticRegressionParams with MLWritable { - @deprecated("Use coefficients instead.", "1.6.0") - def weights: Vector = coefficients - @Since("1.5.0") override def setThreshold(value: Double): this.type = super.setThreshold(value) http://git-wip-us.apache.org/repos/asf/spark/blob/e5fb78ba/mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala ---------------------------------------------------------------------- diff --git a/mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala b/mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala index 0be8f3a..5117ee1 100644 --- a/mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala +++ b/mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala @@ -389,9 +389,6 @@ class LinearRegressionModel private[ml] ( private var trainingSummary: Option[LinearRegressionTrainingSummary] = None - @deprecated("Use coefficients instead.", "1.6.0") - def weights: Vector = coefficients - override val numFeatures: Int = coefficients.size /** http://git-wip-us.apache.org/repos/asf/spark/blob/e5fb78ba/project/MimaExcludes.scala ---------------------------------------------------------------------- diff --git a/project/MimaExcludes.scala b/project/MimaExcludes.scala index 6fc49a0..33e0db6 100644 --- a/project/MimaExcludes.scala +++ b/project/MimaExcludes.scala @@ -689,6 +689,11 @@ object MimaExcludes { // [SPARK-4452][Core]Shuffle data structures can starve others on the same thread for memory ProblemFilters.exclude[IncompatibleTemplateDefProblem]("org.apache.spark.util.collection.Spillable") ) ++ Seq( + // [SPARK-14952][Core][ML] Remove methods deprecated in 1.6 + ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.input.PortableDataStream.close"), + ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.ml.classification.LogisticRegressionModel.weights"), + ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.ml.regression.LinearRegressionModel.weights") + ) ++ Seq( // SPARK-14654: New accumulator API ProblemFilters.exclude[MissingTypesProblem]("org.apache.spark.ExceptionFailure$"), ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.ExceptionFailure.apply"), http://git-wip-us.apache.org/repos/asf/spark/blob/e5fb78ba/python/pyspark/ml/classification.py ---------------------------------------------------------------------- diff --git a/python/pyspark/ml/classification.py b/python/pyspark/ml/classification.py index cc562d2..f616c7f 100644 --- a/python/pyspark/ml/classification.py +++ b/python/pyspark/ml/classification.py @@ -214,16 +214,6 @@ class LogisticRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable): """ @property - @since("1.4.0") - def weights(self): - """ - Model weights. - """ - - warnings.warn("weights is deprecated. Use coefficients instead.") - return self._call_java("weights") - - @property @since("1.6.0") def coefficients(self): """ http://git-wip-us.apache.org/repos/asf/spark/blob/e5fb78ba/python/pyspark/ml/regression.py ---------------------------------------------------------------------- diff --git a/python/pyspark/ml/regression.py b/python/pyspark/ml/regression.py index 8e76070..d490953 100644 --- a/python/pyspark/ml/regression.py +++ b/python/pyspark/ml/regression.py @@ -129,15 +129,6 @@ class LinearRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable): """ @property - @since("1.4.0") - def weights(self): - """ - Model weights. - """ - warnings.warn("weights is deprecated. Use coefficients instead.") - return self._call_java("weights") - - @property @since("1.6.0") def coefficients(self): """ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org For additional commands, e-mail: commits-help@spark.apache.org