Github user adrian-wang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2824#discussion_r18999923
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -280,12 +280,29 @@ private[spark] object Utils extends Logging {
             // When both streams are File stream, use transferTo to improve 
copy performance.
             val inChannel = in.asInstanceOf[FileInputStream].getChannel()
             val outChannel = out.asInstanceOf[FileOutputStream].getChannel()
    +        val initialPos = outChannel.position()
             val size = inChannel.size()
     
             // In case transferTo method transferred less data than we have 
required.
             while (count < size) {
               count += inChannel.transferTo(count, size - count, outChannel)
             }
    +
    +        // Check the position after transferTo loop to see if it is in the 
right position and
    +        // give user information if not.
    +        // Position will not be increased to the expected length after 
calling transferTo in
    +        // kernel version 2.6.32, this issue can be seen in
    +        // scalastyle:off
    +        // 
https://bugs.openjdk.java.net/browse/JDK-7052359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel)
    --- End diff --
    
    You can remove url part after the '?' here.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to