You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by caneGuy <gi...@git.apache.org> on 2017/07/25 10:06:09 UTC

[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

GitHub user caneGuy opened a pull request:

    https://github.com/apache/spark/pull/18730

    [SPARK-21527][CORE] Use buffer limit in order to use JAVA NIO Util's buffercache

    ## What changes were proposed in this pull request?
    
    Right now, ChunkedByteBuffer#writeFully do not slice bytes first.We observe code in java nio Util#getTemporaryDirectBuffer below:
    
    
            BufferCache cache = bufferCache.get();
            ByteBuffer buf = cache.get(size);
            if (buf != null) {
                return buf;
            } else {
                // No suitable buffer in the cache so we need to allocate a new
                // one. To avoid the cache growing then we remove the first
                // buffer from the cache and free it.
                if (!cache.isEmpty()) {
                    buf = cache.removeFirst();
                    free(buf);
                }
                return ByteBuffer.allocateDirect(size);
            }
    
    
    If we slice first with a fixed size, we can use buffer cache and only need to allocate at the first write call.
    Since we allocate new buffer, we can not control the free time of this buffer.This once cause memory issue in our production cluster.
    In this patch, i supply a new api which will slice with fixed size for buffer writing.
    
    ## How was this patch tested?
    
    Unit test and test in production.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/caneGuy/spark zhoukang/improve-chunkwrite

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18730.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18730
    
----
commit 7cbadc5e367a045dd70af4c85e4c17fd0ac3cba7
Author: zhoukang <zh...@xiaomi.com>
Date:   2017-07-25T09:44:46Z

    [SPARK][CORE] Slice write by channel

----


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81087/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81082 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81082/testReport)** for PR 18730 at commit [`ab384d4`](https://github.com/apache/spark/commit/ab384d4e94ed37e8943f368ff557ee0a80ddd435).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81091 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81091/testReport)** for PR 18730 at commit [`f1d67a3`](https://github.com/apache/spark/commit/f1d67a39abf574d551c95865d59dc0c7e6d24c7a).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    I mock some local test for two different api. From the simple test result, we can see slice will not affect the performance of write bytes.Test result below:
    ```
    【Test 10 chunks each with 30m for 1 loop】
    Time cost with 1 loop for writeFully(): 83 ms
    Time cost with 1 loop for writeWithSlice(): 76 ms
    【Ending】
    
    【Test 10 chunks each with 100m for 1 loop】
    Time cost with 1 loop for writeFully(): 219 ms
    Time cost with 1 loop for writeWithSlice(): 213 ms
    【Ending】
    
    【Test 10 chunks each with 30m for 10 loop】
    Time cost with 10 loop for writeFully(): 982 ms
    Time cost with 10 loop for writeWithSlice(): 1000 ms
    【Ending】
    
    【Test 10 chunks each with 100m for 10 loop】
    Time cost with 10 loop for writeFully(): 3298 ms
    Time cost with 10 loop for writeWithSlice(): 3454 ms
    【Ending】
    
    【Test 10 chunks each with 30m for 50 loop】
    Time cost with 50 loop for writeFully(): 3444 ms
    Time cost with 50 loop for writeWithSlice(): 3329 ms
    【Ending】
    
    【Test 10 chunks each with 100m for 50 loop】
    Time cost with 50 loop for writeFully(): 21913 ms
    Time cost with 50 loop for writeWithSlice(): 17574 ms
    【Ending】
    ```
    Test code below:
    ```
    test("benchmark testing") {
        // scalastyle:off
        val buffer100 = ByteBuffer.allocate(1024 * 1024 * 100)
        val buffer30 = ByteBuffer.allocate(1024 * 1024 * 30)
        testWithLoop(1, new ChunkedByteBuffer(Array.fill(10)(buffer30)), "Test 10 chunks each with 30m for 1 loop")
        testWithLoop(1, new ChunkedByteBuffer(Array.fill(10)(buffer100)), "Test 10 chunks each with 100m for 1 loop")
    
        testWithLoop(10, new ChunkedByteBuffer(Array.fill(10)(buffer30)), "Test 10 chunks each with 30m for 10 loop")
        testWithLoop(10, new ChunkedByteBuffer(Array.fill(10)(buffer100)), "Test 10 chunks each with 100m for 10 loop")
    
        testWithLoop(50, new ChunkedByteBuffer(Array.fill(10)(buffer30)), "Test 10 chunks each with 30m for 50 loop")
        testWithLoop(50, new ChunkedByteBuffer(Array.fill(10)(buffer100)), "Test 10 chunks each with 100m for 50 loop")
      }
    
      // scalastyle:off
      private def testWithLoop(loopTimes : Int, chunkedByteBuffer: ChunkedByteBuffer, testString: String) {
        System.out.println(s"【$testString】")
        var starTime = System.currentTimeMillis()
        for (i <- 1 to loopTimes) {
          chunkedByteBuffer.writeFully(new ByteArrayWritableChannel(chunkedByteBuffer.size.toInt))
        }
        System.out.println(s"Time cost with $loopTimes loop for writeFully():${Utils.getUsedTimeMs(starTime)}")
        starTime = System.currentTimeMillis()
        for (i <- 1 to loopTimes) {
          chunkedByteBuffer.writeWithSlice(new ByteArrayWritableChannel(chunkedByteBuffer.size.toInt))
        }
        System.out.println(s"Time cost with $loopTimes loop for writeWithSlice():${Utils.getUsedTimeMs(starTime)}")
        System.out.println("【Ending】")
        System.out.println("")
      }
    ```


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135023833
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -56,7 +58,10 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
        */
       def writeFully(channel: WritableByteChannel): Unit = {
         for (bytes <- getChunks()) {
    -      while (bytes.remaining > 0) {
    +      val capacity = bytes.limit()
    +      while (bytes.position() < capacity && bytes.remaining() > 0) {
    +        val ioSize = Math.min(bytes.remaining(), NIO_BUFFER_LIMIT.toInt)
    --- End diff --
    
    why `toInt` 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81061 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81061/testReport)** for PR 18730 at commit [`bab91db`](https://github.com/apache/spark/commit/bab91db933947b57159b21e5f6506570b6b721cb).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy closed the pull request at:

    https://github.com/apache/spark/pull/18730


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135035087
  
    --- Diff: core/src/main/scala/org/apache/spark/internal/config/package.scala ---
    @@ -336,4 +336,11 @@ package object config {
             "spark.")
           .booleanConf
           .createWithDefault(false)
    +
    +  private[spark] val STORAGE_NIO_BUFFER_LIMIT =
    --- End diff --
    
    `BUFFER_WRITE_CHUNK_SIZE`?


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Update with [Benchmark](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Benchmark.scala) @kiszk 
    ```
    Running benchmark: Benchmark writeWithSlice() and writeFully()
      Running case: Test writeFully() chunks each with 30m for 10 loop
      Stopped after 10 iterations, 2365 ms
      Running case: Test writeWithSlice() chunks each with 30m for 10 loop
      Stopped after 10 iterations, 1440 ms
      Running case: Test writeFully() chunks each with 100m for 50 loop
      Stopped after 50 iterations, 2860 ms
      Running case: Test writeWithSlice() chunks each with 100m for 50 loop
      Stopped after 50 iterations, 2834 ms
    
    Java HotSpot(TM) 64-Bit Server VM 1.8.0_25-b17 on Linux 4.4.0-64-generic
    Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
    Benchmark writeWithSlice() and writeFully(): Best/Avg Time(ms)    Rate(M/s)   Per Row(ns)   Relative
    ------------------------------------------------------------------------------------------------
    Test writeFully() chunks each with 30m for 10 loop        98 /  237        160.8           6.2       1.0X
    Test writeWithSlice() chunks each with 30m for 10 loop        55 /  144        287.6           3.5       1.8X
    Test writeFully() chunks each with 100m for 50 loop        54 /   57        290.3           3.4       1.8X
    Test writeWithSlice() chunks each with 100m for 50 loop        54 /   57        288.9           3.5       1.8X
    ```


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Can one of the admins verify this patch?


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81023 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81023/testReport)** for PR 18730 at commit [`fc91f96`](https://github.com/apache/spark/commit/fc91f96085b4706e09e1e5adccf017b22ffe062b).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81064 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81064/testReport)** for PR 18730 at commit [`72aef67`](https://github.com/apache/spark/commit/72aef679b498bb042ecb9ffa8df62ed41e1f519d).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81085/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81069/
    Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Can one of the admins verify this patch?


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

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

[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81128 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81128/testReport)** for PR 18730 at commit [`a02575e`](https://github.com/apache/spark/commit/a02575e3bb3f5f7f2f2d9f7a0a51a1f162c12c4d).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81083 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81083/testReport)** for PR 18730 at commit [`b669351`](https://github.com/apache/spark/commit/b6693513441faf350dcdc3636723359561346a17).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81069 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81069/testReport)** for PR 18730 at commit [`aeabe1d`](https://github.com/apache/spark/commit/aeabe1d1aacf5abf58d631bc291dd409728b5569).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81125/
    Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    @cloud-fan Jekins done!


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Done @cloud-fan 


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    @cloud-fan Thanks for your time to review this pr.Actually,there is an application in our cluster always failed with direct memory oom.I have not measure performance with some bechmark test,but this feature has run in our cluster for a long time and i observed this has not caused any performance issue.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135203892
  
    --- Diff: core/src/main/scala/org/apache/spark/internal/config/package.scala ---
    @@ -293,6 +293,13 @@ package object config {
           .booleanConf
           .createWithDefault(false)
     
    +  private[spark] val BUFFER_WRITE_CHUNK_SIZE =
    +    ConfigBuilder("spark.buffer.write.chunkSize")
    +      .internal()
    +      .doc("The chunk size during writing out the bytes of ChunkedByteBuffer.")
    +      .bytesConf(ByteUnit.BYTE)
    +      .createWithDefault(64 * 1024 * 1024)
    --- End diff --
    
    add a `checkValue` to make sure the value is smaller than `Int.Max`


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81023/
    Test PASSed.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135026591
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -56,7 +58,10 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
        */
       def writeFully(channel: WritableByteChannel): Unit = {
         for (bytes <- getChunks()) {
    -      while (bytes.remaining > 0) {
    +      val capacity = bytes.limit()
    +      while (bytes.position() < capacity && bytes.remaining() > 0) {
    --- End diff --
    
    why we need `bytes.position() < capacity`? isn't `bytes.remaining() > 0` enough?


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by jiangxb1987 <gi...@git.apache.org>.
Github user jiangxb1987 commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    It would be great to benchmark this improvement, otherwise we are not sure there is no regression.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81020/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test PASSed.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135036499
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -40,6 +41,9 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       require(chunks != null, "chunks must not be null")
       require(chunks.forall(_.position() == 0), "chunks' positions must be 0")
     
    +  // Chunk size in bytes
    +  private val NIO_BUFFER_LIMIT = SparkEnv.get.conf.get(config.STORAGE_NIO_BUFFER_LIMIT)
    --- End diff --
    
    `SparkEnv.get` may be null in test cases, how about `Option(SparkEnv.get).map(_.conf.get(BUFFER_WRITE_CHUNK_SIZE)).getOrElse(BUFFER_WRITE_CHUNK_SIZE.defaultValue.get)`


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81064 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81064/testReport)** for PR 18730 at commit [`72aef67`](https://github.com/apache/spark/commit/72aef679b498bb042ecb9ffa8df62ed41e1f519d).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81080/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81087 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81087/testReport)** for PR 18730 at commit [`e48f44f`](https://github.com/apache/spark/commit/e48f44f99355c2811c4cc8f094c062dee33ff428).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81068 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81068/testReport)** for PR 18730 at commit [`4789772`](https://github.com/apache/spark/commit/478977293aadb9383740eabbaee23a43cc64b062).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81091 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81091/testReport)** for PR 18730 at commit [`f1d67a3`](https://github.com/apache/spark/commit/f1d67a39abf574d551c95865d59dc0c7e6d24c7a).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81082/
    Test PASSed.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/18730


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81089 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81089/testReport)** for PR 18730 at commit [`fc184aa`](https://github.com/apache/spark/commit/fc184aa535b2bf9cd771739da6ac1bbbec0504c4).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81081/
    Test PASSed.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135037104
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -40,6 +41,9 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       require(chunks != null, "chunks must not be null")
       require(chunks.forall(_.position() == 0), "chunks' positions must be 0")
     
    +  // Chunk size in bytes
    +  private val NIO_BUFFER_LIMIT = SparkEnv.get.conf.get(config.BUFFER_WRITE_CHUNK_SIZE)
    --- End diff --
    
    and this is not a constant anyway, we should use lower-cased variable name, how about `val bufferWriteChunkSize`


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81089 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81089/testReport)** for PR 18730 at commit [`fc184aa`](https://github.com/apache/spark/commit/fc184aa535b2bf9cd771739da6ac1bbbec0504c4).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81086 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81086/testReport)** for PR 18730 at commit [`9d3004d`](https://github.com/apache/spark/commit/9d3004d5fc91b3b49b314ad08fd3866d3fa5b020).


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135027030
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -40,6 +40,8 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       require(chunks != null, "chunks must not be null")
       require(chunks.forall(_.position() == 0), "chunks' positions must be 0")
     
    +  private val NIO_BUFFER_LIMIT = 64 * 1024 * 1024 // Chunk size in bytes
    --- End diff --
    
    shall we make it configurable? we can add a new entry in `org.apache.spark.internal.config`, and mark it as an internal config first.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    @cloud-fan can we retest this?Thanks


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by kiszk <gi...@git.apache.org>.
Github user kiszk commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Thank you for preparing a benchmark. Could you please write a benchmark using [Benchmark](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Benchmark.scala) class?
    Java/Scala benchmark usually needs warmup run to avoid execution time by an interpreter.



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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    LGTM, pending jenkins


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135023674
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -40,6 +40,8 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       require(chunks != null, "chunks must not be null")
       require(chunks.forall(_.position() == 0), "chunks' positions must be 0")
     
    +  private val NIO_BUFFER_LIMIT = 64 * 1024 * 1024 // Chunk size in bytes
    --- End diff --
    
    have you tested with different numbers? is 64mb the best choice?


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81125 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81125/testReport)** for PR 18730 at commit [`14ca824`](https://github.com/apache/spark/commit/14ca824794ffd543aa169327e78de95f23b1102d).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81085 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81085/testReport)** for PR 18730 at commit [`717f886`](https://github.com/apache/spark/commit/717f8863e1f3555febddb27116738268246dd57e).
     * This patch **fails to build**.
     * This patch **does not merge cleanly**.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81075 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81075/testReport)** for PR 18730 at commit [`e84a6d7`](https://github.com/apache/spark/commit/e84a6d7862b60fdabf7a463f08e911baf74d7e62).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81082 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81082/testReport)** for PR 18730 at commit [`ab384d4`](https://github.com/apache/spark/commit/ab384d4e94ed37e8943f368ff557ee0a80ddd435).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81061 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81061/testReport)** for PR 18730 at commit [`bab91db`](https://github.com/apache/spark/commit/bab91db933947b57159b21e5f6506570b6b721cb).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Build finished. Test FAILed.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135027706
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -56,7 +58,10 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
        */
       def writeFully(channel: WritableByteChannel): Unit = {
         for (bytes <- getChunks()) {
    -      while (bytes.remaining > 0) {
    +      val capacity = bytes.limit()
    +      while (bytes.position() < capacity && bytes.remaining() > 0) {
    --- End diff --
    
    Fixed.Sorry for that.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81069 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81069/testReport)** for PR 18730 at commit [`aeabe1d`](https://github.com/apache/spark/commit/aeabe1d1aacf5abf58d631bc291dd409728b5569).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81112 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81112/testReport)** for PR 18730 at commit [`14ca824`](https://github.com/apache/spark/commit/14ca824794ffd543aa169327e78de95f23b1102d).
     * This patch **fails PySpark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81128 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81128/testReport)** for PR 18730 at commit [`a02575e`](https://github.com/apache/spark/commit/a02575e3bb3f5f7f2f2d9f7a0a51a1f162c12c4d).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81083/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    retest this please


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81075/
    Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81061/
    Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Thanks for your time @cloud-fan 


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81089/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81128/
    Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81081 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81081/testReport)** for PR 18730 at commit [`33a2796`](https://github.com/apache/spark/commit/33a27960d8635fde62351ddbf73304e55d54da15).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    retest this please


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81018 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81018/testReport)** for PR 18730 at commit [`7cbadc5`](https://github.com/apache/spark/commit/7cbadc5e367a045dd70af4c85e4c17fd0ac3cba7).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135040705
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -40,6 +41,9 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       require(chunks != null, "chunks must not be null")
       require(chunks.forall(_.position() == 0), "chunks' positions must be 0")
     
    +  // Chunk size in bytes
    +  private val NIO_BUFFER_LIMIT = SparkEnv.get.conf.get(config.STORAGE_NIO_BUFFER_LIMIT)
    --- End diff --
    
    Good reivew, actually i did not realize that.Thanks!


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81074/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    @jiangxb1987 Ok,i will try to do some benchmark tesing.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r134656903
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -63,6 +65,19 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       }
     
       /**
    +    * Write this buffer to a channel with slice.
    +    */
    +  def writeWithSlice(channel: WritableByteChannel): Unit = {
    --- End diff --
    
    can we use this one to replace `writeFully`?


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81018 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81018/testReport)** for PR 18730 at commit [`7cbadc5`](https://github.com/apache/spark/commit/7cbadc5e367a045dd70af4c85e4c17fd0ac3cba7).


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135035565
  
    --- Diff: core/src/main/scala/org/apache/spark/internal/config/package.scala ---
    @@ -336,4 +336,11 @@ package object config {
             "spark.")
           .booleanConf
           .createWithDefault(false)
    +
    +  private[spark] val STORAGE_NIO_BUFFER_LIMIT =
    +    ConfigBuilder("spark.storage.nioBufferLimit")
    +      .internal()
    +      .doc("The block size limit when use ChunkedByteBuffer to writeFully bytes.")
    --- End diff --
    
    `The chunk size during writing out a ChunkedByteBuffer`


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81068/
    Test FAILed.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by caneGuy <gi...@git.apache.org>.
GitHub user caneGuy reopened a pull request:

    https://github.com/apache/spark/pull/18730

    [SPARK-21527][CORE] Use buffer limit in order to use JAVA NIO Util's buffercache

    ## What changes were proposed in this pull request?
    
    Right now, ChunkedByteBuffer#writeFully do not slice bytes first.We observe code in java nio Util#getTemporaryDirectBuffer below:
    
    
            BufferCache cache = bufferCache.get();
            ByteBuffer buf = cache.get(size);
            if (buf != null) {
                return buf;
            } else {
                // No suitable buffer in the cache so we need to allocate a new
                // one. To avoid the cache growing then we remove the first
                // buffer from the cache and free it.
                if (!cache.isEmpty()) {
                    buf = cache.removeFirst();
                    free(buf);
                }
                return ByteBuffer.allocateDirect(size);
            }
    
    
    If we slice first with a fixed size, we can use buffer cache and only need to allocate at the first write call.
    Since we allocate new buffer, we can not control the free time of this buffer.This once cause memory issue in our production cluster.
    In this patch, i supply a new api which will slice with fixed size for buffer writing.
    
    ## How was this patch tested?
    
    Unit test and test in production.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/caneGuy/spark zhoukang/improve-chunkwrite

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18730.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18730
    
----
commit 7cbadc5e367a045dd70af4c85e4c17fd0ac3cba7
Author: zhoukang <zh...@xiaomi.com>
Date:   2017-07-25T09:44:46Z

    [SPARK][CORE] Slice write by channel

----


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135026463
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -40,6 +40,8 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       require(chunks != null, "chunks must not be null")
       require(chunks.forall(_.position() == 0), "chunks' positions must be 0")
     
    +  private val NIO_BUFFER_LIMIT = 64 * 1024 * 1024 // Chunk size in bytes
    --- End diff --
    
    actually i did not tested too much, it depends on value from our cluster.And i do some simple test then found 64mb will not affect perfomance compared with logic before.And benifit is we only need one buffer cache for block larger than 64 mb


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81080 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81080/testReport)** for PR 18730 at commit [`d708142`](https://github.com/apache/spark/commit/d7081428f145f94283304184ad14d2144077b04d).
     * This patch **fails SparkR unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81086 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81086/testReport)** for PR 18730 at commit [`9d3004d`](https://github.com/apache/spark/commit/9d3004d5fc91b3b49b314ad08fd3866d3fa5b020).
     * This patch **fails to build**.
     * This patch **does not merge cleanly**.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81085 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81085/testReport)** for PR 18730 at commit [`717f886`](https://github.com/apache/spark/commit/717f8863e1f3555febddb27116738268246dd57e).


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r134912125
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -63,6 +65,19 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       }
     
       /**
    +   * Write this buffer to a channel with slice.
    +   */
    +  def writeWithSlice(channel: WritableByteChannel): Unit = {
    +    for (bytes <- getChunks()) {
    +      val capacity = bytes.limit()
    +      while (bytes.position() < capacity) {
    +        bytes.limit(Math.min(capacity, bytes.position + NIO_BUFFER_LIMIT.toInt))
    --- End diff --
    
    Good review.I refactor the code.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135035659
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -56,7 +60,10 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
        */
       def writeFully(channel: WritableByteChannel): Unit = {
         for (bytes <- getChunks()) {
    -      while (bytes.remaining > 0) {
    +      val capacity = bytes.limit()
    --- End diff --
    
    this line is not used.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81020 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81020/testReport)** for PR 18730 at commit [`fc91f96`](https://github.com/apache/spark/commit/fc91f96085b4706e09e1e5adccf017b22ffe062b).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81086/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81083 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81083/testReport)** for PR 18730 at commit [`b669351`](https://github.com/apache/spark/commit/b6693513441faf350dcdc3636723359561346a17).
     * This patch **fails SparkR unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81023 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81023/testReport)** for PR 18730 at commit [`fc91f96`](https://github.com/apache/spark/commit/fc91f96085b4706e09e1e5adccf017b22ffe062b).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81064/
    Test FAILed.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by kiszk <gi...@git.apache.org>.
Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r134786732
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -63,6 +65,19 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       }
     
       /**
    +   * Write this buffer to a channel with slice.
    +   */
    +  def writeWithSlice(channel: WritableByteChannel): Unit = {
    +    for (bytes <- getChunks()) {
    +      val capacity = bytes.limit()
    +      while (bytes.position() < capacity) {
    +        bytes.limit(Math.min(capacity, bytes.position + NIO_BUFFER_LIMIT.toInt))
    --- End diff --
    
    Should we replace `Math.min(...)` with `Math.min(capacity, bytes.position + NIO_BUFFER_LIMIT.toLong)`? I am afraid int underflow. For example, if `capacity = 0x7FFFFFF0` and `bytes.position = 0x7FFFFF00`, the result of `bytes.position + NIO_BUFFER_LIMIT.toLong` is negative (i.e. greater than 0x80000000).
    To avoid this underflow, it would be good to compare them by using `long`.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135203827
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -56,7 +63,9 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
        */
       def writeFully(channel: WritableByteChannel): Unit = {
         for (bytes <- getChunks()) {
    -      while (bytes.remaining > 0) {
    +      while (bytes.remaining() > 0) {
    +        val ioSize = Math.min(bytes.remaining(), bufferWriteChunkSize)
    +        bytes.limit(bytes.position + ioSize.toInt)
    --- End diff --
    
    let's avoid this per-loop type cast, we can make `bufferWriteChunkSize` an int.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    thanks, merging to master!


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81018/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81020 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81020/testReport)** for PR 18730 at commit [`fc91f96`](https://github.com/apache/spark/commit/fc91f96085b4706e09e1e5adccf017b22ffe062b).


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135028531
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -40,6 +40,8 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       require(chunks != null, "chunks must not be null")
       require(chunks.forall(_.position() == 0), "chunks' positions must be 0")
     
    +  private val NIO_BUFFER_LIMIT = 64 * 1024 * 1024 // Chunk size in bytes
    --- End diff --
    
    Ok, i will refactor later.Thanks for your suggestion.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81068 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81068/testReport)** for PR 18730 at commit [`4789772`](https://github.com/apache/spark/commit/478977293aadb9383740eabbaee23a43cc64b062).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81080 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81080/testReport)** for PR 18730 at commit [`d708142`](https://github.com/apache/spark/commit/d7081428f145f94283304184ad14d2144077b04d).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81112 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81112/testReport)** for PR 18730 at commit [`14ca824`](https://github.com/apache/spark/commit/14ca824794ffd543aa169327e78de95f23b1102d).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    looks reasonable, do you have some performance numbers?


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Build finished. Test FAILed.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135036833
  
    --- Diff: core/src/main/scala/org/apache/spark/internal/config/package.scala ---
    @@ -321,6 +321,13 @@ package object config {
           .intConf
           .createWithDefault(3)
     
    +  private[spark] val BUFFER_WRITE_CHUNK_SIZE =
    +    ConfigBuilder("spark.buffer.write.chunkSize")
    +      .internal()
    +      .doc("The block size limit when use ChunkedByteBuffer to writeFully bytes.")
    --- End diff --
    
    The chunk size during writing out the bytes of ChunkedByteBuffer


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81091/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81075 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81075/testReport)** for PR 18730 at commit [`e84a6d7`](https://github.com/apache/spark/commit/e84a6d7862b60fdabf7a463f08e911baf74d7e62).


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81112/
    Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test FAILed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    Merged build finished. Test PASSed.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81087 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81087/testReport)** for PR 18730 at commit [`e48f44f`](https://github.com/apache/spark/commit/e48f44f99355c2811c4cc8f094c062dee33ff428).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    ok to test


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    if there is no regression, can we just update `writeFully` instead of adding `writeWithSlice`?


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81125 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81125/testReport)** for PR 18730 at commit [`14ca824`](https://github.com/apache/spark/commit/14ca824794ffd543aa169327e78de95f23b1102d).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #18730: [SPARK-21527][CORE] Use buffer limit in order to use JAV...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18730
  
    **[Test build #81081 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81081/testReport)** for PR 18730 at commit [`33a2796`](https://github.com/apache/spark/commit/33a27960d8635fde62351ddbf73304e55d54da15).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark pull request #18730: [SPARK-21527][CORE] Use buffer limit in order to ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18730#discussion_r135036642
  
    --- Diff: core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala ---
    @@ -40,6 +41,9 @@ private[spark] class ChunkedByteBuffer(var chunks: Array[ByteBuffer]) {
       require(chunks != null, "chunks must not be null")
       require(chunks.forall(_.position() == 0), "chunks' positions must be 0")
     
    +  // Chunk size in bytes
    +  private val NIO_BUFFER_LIMIT = SparkEnv.get.conf.get(config.BUFFER_WRITE_CHUNK_SIZE)
    --- End diff --
    
    `SparkEnv.get` may be null in test cases, how about `Option(SparkEnv.get).map(_.conf.get(BUFFER_WRITE_CHUNK_SIZE)).getOrElse(BUFFER_WRITE_CHUNK_SIZE.defaultValue.get)`


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

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