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 18cb7631b3d4c8abb7dc7c163877c7f3e1ffe303..f66510b6f977fef1607561599905b44384105ea3 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 } 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 8cd7ee4d9a6eeb84d59232fbcdda30000f0fbec3..717e93c0587f44e40d1b1adbfed0facad11c7331 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) 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 0be8f3aebbe239e1fff5e05a02920892cfbc9688..5117ee115c9ec87e0b1a86cf2fc225d82874e916 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 /** diff --git a/project/MimaExcludes.scala b/project/MimaExcludes.scala index 6fc49a08fe31662ce9119833ffef6d0f9c9bea9b..33e0db606c2ff7e1fa3252f42e6a9cfccd8014b4 100644 --- a/project/MimaExcludes.scala +++ b/project/MimaExcludes.scala @@ -688,6 +688,11 @@ object MimaExcludes { ) ++ Seq( // [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$"), diff --git a/python/pyspark/ml/classification.py b/python/pyspark/ml/classification.py index cc562d2d3d7e632122a0ce9aa8298ce59616fff9..f616c7fbecab194329d9103c5c7dc52e5166a717 100644 --- a/python/pyspark/ml/classification.py +++ b/python/pyspark/ml/classification.py @@ -213,16 +213,6 @@ class LogisticRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable): .. versionadded:: 1.3.0 """ - @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): diff --git a/python/pyspark/ml/regression.py b/python/pyspark/ml/regression.py index 8e76070e9a990207f39b558362f12bd2aff9bbe9..d490953f7933ce12f230367531a492ec3beb8411 100644 --- a/python/pyspark/ml/regression.py +++ b/python/pyspark/ml/regression.py @@ -128,15 +128,6 @@ class LinearRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable): .. versionadded:: 1.4.0 """ - @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):