Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10554#discussion_r48713706
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaPairDStream.scala
 ---
    @@ -848,6 +848,6 @@ object JavaPairDStream {
     
       def scalaToJavaLong[K: ClassTag](dstream: JavaPairDStream[K, Long])
       : JavaPairDStream[K, JLong] = {
    -    DStream.toPairDStreamFunctions(dstream.dstream).mapValues(new JLong(_))
    +    
DStream.toPairDStreamFunctions(dstream.dstream).mapValues(JLong.valueOf)
    --- End diff --
    
    Changed for consistency; `valueOf` is slightly more efficient than the 
constructor since the JDK actually caches `Long` objects for small values.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to