[ 
https://issues.apache.org/jira/browse/SPARK-26115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gengliang Wang resolved SPARK-26115.
------------------------------------
    Resolution: Duplicate

Duplicated to SPARK-2609

> Fix deprecated warnings related to scala 2.12 in core module
> ------------------------------------------------------------
>
>                 Key: SPARK-26115
>                 URL: https://issues.apache.org/jira/browse/SPARK-26115
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 3.0.0
>            Reporter: Gengliang Wang
>            Priority: Minor
>
> {quote}[warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/SparkContext.scala:505:
>  Eta-expansion of zero-argument methods is deprecated. To avoid this warning, 
> write (() => SparkContext.this.reportHeartBeat()).
> [warn]     _heartbeater = new Heartbeater(env.memoryManager, reportHeartBeat, 
> "driver-heartbeater",
> [warn]                                                       ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/deploy/security/HadoopDelegationTokenManager.scala:273:
>  Eta-expansion of zero-argument methods is deprecated. To avoid this warning, 
> write (() => HadoopDelegationTokenManager.this.fileSystemsToAccess()).
> [warn]     val providers = Seq(new 
> HadoopFSDelegationTokenProvider(fileSystemsToAccess)) ++
> [warn]                                                             ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/executor/Executor.scala:193:
>  Eta-expansion of zero-argument methods is deprecated. To avoid this warning, 
> write (() => Executor.this.reportHeartBeat()).
> [warn]   private val heartbeater = new Heartbeater(env.memoryManager, 
> reportHeartBeat,
> [warn]                                                                ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/api/r/RBackend.scala:102:
>  method childGroup in class ServerBootstrap is deprecated: see corresponding 
> Javadoc for more information.
> [warn]     if (bootstrap != null && bootstrap.childGroup() != null) {
> [warn]                                        ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/rdd/UnionRDD.scala:63:
>  type ForkJoinPool in package forkjoin is deprecated (since 2.12.0): use 
> java.util.concurrent.ForkJoinPool directly, instead of this alias
> [warn]     new ForkJoinTaskSupport(new ForkJoinPool(8))
> [warn]                                 ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/scheduler/StageInfo.scala:59:
>  value attemptId in class StageInfo is deprecated (since 2.3.0): Use 
> attemptNumber instead
> [warn]   def attemptNumber(): Int = attemptId
> [warn]                              ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/util/ThreadUtils.scala:186:
>  type ForkJoinPool in package forkjoin is deprecated (since 2.12.0): use 
> java.util.concurrent.ForkJoinPool directly, instead of this alias
> [warn]   def newForkJoinPool(prefix: String, maxThreadNumber: Int): 
> SForkJoinPool = {
> [warn]                                                              ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/util/ThreadUtils.scala:189:
>  type ForkJoinPool in package forkjoin is deprecated (since 2.12.0): use 
> java.util.concurrent.ForkJoinPool directly, instead of this alias
> [warn]       override def newThread(pool: SForkJoinPool) =
> [warn]                                    ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/util/ThreadUtils.scala:190:
>  type ForkJoinWorkerThread in package forkjoin is deprecated (since 2.12.0): 
> use java.util.concurrent.ForkJoinWorkerThread directly, instead of this alias
> [warn]         new SForkJoinWorkerThread(pool) {
> [warn]             ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/util/ThreadUtils.scala:194:
>  type ForkJoinPool in package forkjoin is deprecated (since 2.12.0): use 
> java.util.concurrent.ForkJoinPool directly, instead of this alias
> [warn]     new SForkJoinPool(maxThreadNumber, factory,
> [warn]         ^
> [warn] 10 warnings found
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/SparkContext.scala:505:
>  Eta-expansion of zero-argument methods is deprecated. To avoid this warning, 
> write (() => SparkContext.this.reportHeartBeat()).
> [warn]     _heartbeater = new Heartbeater(env.memoryManager, reportHeartBeat, 
> "driver-heartbeater",
> [warn] 
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/deploy/security/HadoopDelegationTokenManager.scala:273:
>  Eta-expansion of zero-argument methods is deprecated. To avoid this warning, 
> write (() => HadoopDelegationTokenManager.this.fileSystemsToAccess()).
> [warn]     val providers = Seq(new 
> HadoopFSDelegationTokenProvider(fileSystemsToAccess)) ++
> [warn] 
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/api/r/RBackend.scala:102:
>  method childGroup in class ServerBootstrap is deprecated: see corresponding 
> Javadoc for more information.
> [warn]     if (bootstrap != null && bootstrap.childGroup() != null) {
> [warn] 
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/util/ThreadUtils.scala:186:
>  type ForkJoinPool in package forkjoin is deprecated (since 2.12.0): use 
> java.util.concurrent.ForkJoinPool directly, instead of this alias
> [warn]   def newForkJoinPool(prefix: String, maxThreadNumber: Int): 
> SForkJoinPool = {
> [warn] 
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/util/ThreadUtils.scala:189:
>  type ForkJoinPool in package forkjoin is deprecated (since 2.12.0): use 
> java.util.concurrent.ForkJoinPool directly, instead of this alias
> [warn]       override def newThread(pool: SForkJoinPool) =
> [warn] 
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/util/ThreadUtils.scala:190:
>  type ForkJoinWorkerThread in package forkjoin is deprecated (since 2.12.0): 
> use java.util.concurrent.ForkJoinWorkerThread directly, instead of this alias
> [warn]         new SForkJoinWorkerThread(pool) {
> [warn] 
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/util/ThreadUtils.scala:194:
>  type ForkJoinPool in package forkjoin is deprecated (since 2.12.0): use 
> java.util.concurrent.ForkJoinPool directly, instead of this alias
> [warn]     new SForkJoinPool(maxThreadNumber, factory,
> [warn] 
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/rdd/UnionRDD.scala:63:
>  type ForkJoinPool in package forkjoin is deprecated (since 2.12.0): use 
> java.util.concurrent.ForkJoinPool directly, instead of this alias
> [warn]     new ForkJoinTaskSupport(new ForkJoinPool(8))
> [warn] 
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/executor/Executor.scala:193:
>  Eta-expansion of zero-argument methods is deprecated. To avoid this warning, 
> write (() => Executor.this.reportHeartBeat()).
> [warn]   private val heartbeater = new Heartbeater(env.memoryManager, 
> reportHeartBeat,
> [warn] 
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/main/scala/org/apache/spark/scheduler/StageInfo.scala:59:
>  value attemptId in class StageInfo is deprecated (since 2.3.0): Use 
> attemptNumber instead
> [warn]   def attemptNumber(): Int = attemptId
> [warn] 
> [warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to 
> see the list
> [info] Packaging 
> /Users/gengliangwang/IdeaProjects/spark/core/target/scala-2.12/spark-core_2.12-3.0.0-SNAPSHOT.jar
>  ...
> [info] Done packaging.
> [info] Compiling 247 Scala sources and 30 Java sources to 
> /Users/gengliangwang/IdeaProjects/spark/sql/catalyst/target/scala-2.12/classes...
> [info] Compiling 241 Scala sources and 26 Java sources to 
> /Users/gengliangwang/IdeaProjects/spark/core/target/scala-2.12/test-classes...
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/HyperLogLogPlusPlusHelper.scala:202:
>  method << in class Int is deprecated (since 2.12.7): shifting a value by a 
> `Long` argument is deprecated (except when the value is a `Long`).
> [warn] Call `toInt` on the argument to maintain the current behavior and 
> avoid the deprecation warning.
> [warn]         zInverse += 1.0 / (1 << Midx)
> [warn]                              ^
> [warn] 
> /Users/gengliangwang/IdeaProjects/spark/core/src/test/scala/org/apache/spark/util/collection/ExternalAppendOnlyMapSuite.scala:461:
>  postfix operator seconds should be enabled
> [warn] by making the implicit value scala.language.postfixOps visible.
> [warn] This can be achieved by adding the import clause 'import 
> scala.language.postfixOps'
> [warn] or by setting the compiler option -language:postfixOps.
> [warn] See the Scaladoc for value scala.language.postfixOps for a discussion
> [warn] why the feature should be explicitly enabled.
> [warn]     eventually(timeout(5 seconds), interval(200 milliseconds)) {{quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to