You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zsxwing <gi...@git.apache.org> on 2015/02/28 07:51:21 UTC

[GitHub] spark pull request: [SPARK-6076][Block Manager] Fix a potential OO...

GitHub user zsxwing opened a pull request:

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

    [SPARK-6076][Block Manager] Fix a potential OOM issue when StorageLevel is MEMORY_AND_DISK_SER

    In https://github.com/apache/spark/blob/dcd1e42d6b6ac08d2c0736bf61a15f515a1f222b/core/src/main/scala/org/apache/spark/storage/BlockManager.scala#L538 , when StorageLevel is `MEMORY_AND_DISK_SER`, it will copy the content from file into memory, then put it into MemoryStore.
    ```
    scala
                  val copyForMemory = ByteBuffer.allocate(bytes.limit)
                  copyForMemory.put(bytes)
                  memoryStore.putBytes(blockId, copyForMemory, level)
                  bytes.rewind()
    ```
    However, if the file is bigger than the free memory, OOM will happen. A better approach is testing if there is enough memory. If not, copyForMemory should not be created, since this is an option operation.

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

    $ git pull https://github.com/zsxwing/spark SPARK-6076

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

    https://github.com/apache/spark/pull/4827.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 #4827
    
----
commit 0cc0257769070843e05ec010220a78827001f519
Author: zsxwing <zs...@gmail.com>
Date:   2015-02-28T06:49:32Z

    Fix a potential OOM issue when StorageLevel is MEMORY_AND_DISK_SER

----


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#issuecomment-84779443
  
      [Test build #28976 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/28976/consoleFull) for   PR 4827 at commit [`1100a54`](https://github.com/apache/spark/commit/1100a5469e6ac16e3246748912b61e864c0dbe4a).
     * This patch merges cleanly.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#discussion_r27091991
  
    --- Diff: core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala ---
    @@ -170,8 +170,8 @@ class BlockManagerSuite extends FunSuite with Matchers with BeforeAndAfterEach
         assert(master.getLocations("a3").size === 0, "master was told about a3")
     
         // Drop a1 and a2 from memory; this should be reported back to the master
    -    store.dropFromMemory("a1", null)
    -    store.dropFromMemory("a2", null)
    +    store.dropFromMemory("a1", null: Either[Array[Any], ByteBuffer])
    +    store.dropFromMemory("a2", null: Either[Array[Any], ByteBuffer])
    --- End diff --
    
    Yes. But I think we only use `null` in some unit tests, right?


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#discussion_r27091788
  
    --- Diff: core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala ---
    @@ -170,8 +170,8 @@ class BlockManagerSuite extends FunSuite with Matchers with BeforeAndAfterEach
         assert(master.getLocations("a3").size === 0, "master was told about a3")
     
         // Drop a1 and a2 from memory; this should be reported back to the master
    -    store.dropFromMemory("a1", null)
    -    store.dropFromMemory("a2", null)
    +    store.dropFromMemory("a1", null: Either[Array[Any], ByteBuffer])
    +    store.dropFromMemory("a2", null: Either[Array[Any], ByteBuffer])
    --- End diff --
    
    ah, looks like the alias caused compilation issues. This is unfortunate.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#issuecomment-76514362
  
      [Test build #28118 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/28118/consoleFull) for   PR 4827 at commit [`0cc0257`](https://github.com/apache/spark/commit/0cc0257769070843e05ec010220a78827001f519).
     * This patch merges cleanly.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#issuecomment-85812116
  
      [Test build #29137 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/29137/consoleFull) for   PR 4827 at commit [`7d25545`](https://github.com/apache/spark/commit/7d25545a78aee5f5833c88667e438bb8fcf891ab).
     * 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: [SPARK-6076][Block Manager] Fix a potential OO...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/4827#issuecomment-84238397
  
    @andrewor14 is it acceptable that changing call-by-name to `() => Unit`?


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

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


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#discussion_r27083960
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/MemoryStore.scala ---
    @@ -97,11 +117,11 @@ private[spark] class MemoryStore(blockManager: BlockManager, maxMemory: Long)
           returnValues: Boolean): PutResult = {
         if (level.deserialized) {
           val sizeEstimate = SizeEstimator.estimate(values.asInstanceOf[AnyRef])
    -      val putAttempt = tryToPut(blockId, values, sizeEstimate, deserialized = true)
    +      val putAttempt = tryToPut(blockId, () => values, sizeEstimate, deserialized = true)
           PutResult(sizeEstimate, Left(values.iterator), putAttempt.droppedBlocks)
         } else {
           val bytes = blockManager.dataSerialize(blockId, values.iterator)
    -      val putAttempt = tryToPut(blockId, bytes, bytes.limit, deserialized = false)
    +      val putAttempt = tryToPut(blockId, () => bytes, bytes.limit, deserialized = false)
    --- End diff --
    
    it's a little odd for this to be `() => bytes` everywhere. Can you create an alias that looks something like:
    ```
    private def tryToPut(blockId: BlockId, value: Any, ...): ResultWithDroppedBlocks = {
      tryToPut(blockId, () => value(), ...)
    }
    ```
    same with dropFromMemory


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#issuecomment-85812132
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29137/
    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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#issuecomment-76516447
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/28118/
    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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#issuecomment-85784928
  
      [Test build #29137 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/29137/consoleFull) for   PR 4827 at commit [`7d25545`](https://github.com/apache/spark/commit/7d25545a78aee5f5833c88667e438bb8fcf891ab).
     * This patch merges cleanly.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/4827#issuecomment-76681216
  
    CC @andrewor14


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/4827#issuecomment-83769366
  
    Sorry for the delay. I was away for a little more than a week and I will look at this later today.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/4827#issuecomment-85740521
  
    Thanks @zsxwing I left one more code style comment and I think it's ready after 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 pull request: [SPARK-6076][Block Manager] Fix a potential OO...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/4827#issuecomment-85800659
  
    LGTM. I will merge this once tests pass 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 pull request: [SPARK-6076][Block Manager] Fix a potential OO...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/4827#issuecomment-82703473
  
    CC @andrewor14 again in case it was missed.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#issuecomment-84809868
  
      [Test build #28976 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/28976/consoleFull) for   PR 4827 at commit [`1100a54`](https://github.com/apache/spark/commit/1100a5469e6ac16e3246748912b61e864c0dbe4a).
     * 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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#discussion_r26870986
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala ---
    @@ -535,9 +535,10 @@ private[spark] class BlockManager(
                   /* We'll store the bytes in memory if the block's storage level includes
                    * "memory serialized", or if it should be cached as objects in memory
                    * but we only requested its serialized bytes. */
    -              val copyForMemory = ByteBuffer.allocate(bytes.limit)
    -              copyForMemory.put(bytes)
    -              memoryStore.putBytes(blockId, copyForMemory, level)
    +              memoryStore.putBytes(blockId, bytes.limit) {
    --- End diff --
    
    could you add a // comment here that links to this JIRA? Otherwise it's not clear why we need to do this lazily.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/4827#issuecomment-84779395
  
    @andrewor14 I updated to use `() => T`.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#issuecomment-84809871
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/28976/
    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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#discussion_r27091751
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/MemoryStore.scala ---
    @@ -317,6 +337,29 @@ private[spark] class MemoryStore(blockManager: BlockManager, maxMemory: Long)
           value: Any,
           size: Long,
           deserialized: Boolean): ResultWithDroppedBlocks = {
    +    tryToPut(blockId, () => value, size, deserialized)
    +  }
    +
    +  /**
    +   * Try to put in a set of values, if we can free up enough space. The value should either be
    +   * an Array if deserialized is true or a ByteBuffer otherwise. Its (possibly estimated) size
    +   * must also be passed by the caller.
    +   *
    +   * `value` will be lazily created. If it cannot be put into MemoryStore or disk, `value` won't be
    +   * created to avoid OOM since it may be a big ByteBuffer.
    +   *
    +   * Synchronize on `accountingLock` to ensure that all the put requests and its associated block
    +   * dropping is done by only on thread at a time. Otherwise while one thread is dropping
    +   * blocks to free memory for one block, another thread may use up the freed space for
    +   * another block.
    +   *
    +   * Return whether put was successful, along with the blocks dropped in the process.
    +   */
    --- End diff --
    
    Instead of duplicating the javadocs here I would just refer to the other method. I can fix this when I merge don't worry.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#discussion_r27092730
  
    --- Diff: core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala ---
    @@ -170,8 +170,8 @@ class BlockManagerSuite extends FunSuite with Matchers with BeforeAndAfterEach
         assert(master.getLocations("a3").size === 0, "master was told about a3")
     
         // Drop a1 and a2 from memory; this should be reported back to the master
    -    store.dropFromMemory("a1", null)
    -    store.dropFromMemory("a2", null)
    +    store.dropFromMemory("a1", null: Either[Array[Any], ByteBuffer])
    +    store.dropFromMemory("a2", null: Either[Array[Any], ByteBuffer])
    --- End diff --
    
    I believe so.


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/4827#issuecomment-84128164
  
    @zsxwing the approach looks reasonable. I'm wondering if there's a more readable way to do the same thing. In particular, currently this uses call-by-name (`tryToPut`, `dropFromMemory`...) and multiple parameters (your new `MemoryStore#putBytes`), which we actually discourage in the Databricks style guide: https://github.com/databricks/scala-style-guide. How much of a change will this patch be instead if we rewrite this patch according to the style guide?


---
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: [SPARK-6076][Block Manager] Fix a potential OO...

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

    https://github.com/apache/spark/pull/4827#issuecomment-76516442
  
      [Test build #28118 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/28118/consoleFull) for   PR 4827 at commit [`0cc0257`](https://github.com/apache/spark/commit/0cc0257769070843e05ec010220a78827001f519).
     * 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: [SPARK-6076][Block Manager] Fix a potential OO...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/4827#issuecomment-86179649
  
    Merged this into 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