spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwend...@apache.org
Subject git commit: SPARK-1467: Make StorageLevel.apply() factory methods Developer APIs
Date Sun, 27 Apr 2014 02:04:46 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.0 dcea67f11 -> 18ecc6347


SPARK-1467: Make StorageLevel.apply() factory methods Developer APIs

We may want to evolve these in the future to add things like SSDs, so let's mark them as experimental
for now. Long-term the right solution might be some kind of builder. The stable API should
be the existing StorageLevel constants.

Author: Sandeep <sandeep@techaddict.me>

Closes #551 from techaddict/SPARK-1467 and squashes the following commits:

6bdda24 [Sandeep] SPARK-1467: Make StorageLevel.apply() factory methods as Developer Api's
We may want to evolve these in the future to add things like SSDs, so let's mark them as experimental
for now. Long-term the right solution might be some kind of builder. The stable API should
be the existing StorageLevel constants.
(cherry picked from commit 762af4e9c2837c8ca125838b2ca01e328ee6669f)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/18ecc634
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/18ecc634
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/18ecc634

Branch: refs/heads/branch-1.0
Commit: 18ecc6347fe8fe8283c3c5a882f55c169233e252
Parents: dcea67f
Author: Sandeep <sandeep@techaddict.me>
Authored: Sat Apr 26 19:04:33 2014 -0700
Committer: Patrick Wendell <pwendell@gmail.com>
Committed: Sat Apr 26 19:04:43 2014 -0700

----------------------------------------------------------------------
 .../org/apache/spark/storage/StorageLevel.scala | 26 +++++++++++++++++---
 1 file changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/18ecc634/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala b/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala
index 95e71de..c9a52e0 100644
--- a/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala
+++ b/core/src/main/scala/org/apache/spark/storage/StorageLevel.scala
@@ -19,6 +19,8 @@ package org.apache.spark.storage
 
 import java.io.{Externalizable, IOException, ObjectInput, ObjectOutput}
 
+import org.apache.spark.annotation.DeveloperApi
+
 /**
  * Flags for controlling the storage of an RDD. Each StorageLevel records whether to use
memory,
  * or Tachyon, whether to drop the RDD to disk if it falls out of memory or Tachyon , whether
to
@@ -142,21 +144,37 @@ object StorageLevel {
   val MEMORY_AND_DISK_SER_2 = new StorageLevel(true, true, false, false, 2)
   val OFF_HEAP = new StorageLevel(false, false, true, false)
 
-  /** Create a new StorageLevel object without setting useOffHeap */
+  /**
+   * :: DeveloperApi ::
+   * Create a new StorageLevel object without setting useOffHeap
+   */
+  @DeveloperApi
   def apply(useDisk: Boolean, useMemory: Boolean, useOffHeap: Boolean,
     deserialized: Boolean, replication: Int) = getCachedStorageLevel(
       new StorageLevel(useDisk, useMemory, useOffHeap, deserialized, replication))
 
-  /** Create a new StorageLevel object */
+  /**
+   * :: DeveloperApi ::
+   * Create a new StorageLevel object
+   */
+  @DeveloperApi
   def apply(useDisk: Boolean, useMemory: Boolean,
     deserialized: Boolean, replication: Int = 1) = getCachedStorageLevel(
       new StorageLevel(useDisk, useMemory, false, deserialized, replication))
 
-  /** Create a new StorageLevel object from its integer representation */
+  /**
+   * :: DeveloperApi ::
+   * Create a new StorageLevel object from its integer representation
+   */
+  @DeveloperApi
   def apply(flags: Int, replication: Int): StorageLevel =
     getCachedStorageLevel(new StorageLevel(flags, replication))
 
-  /** Read StorageLevel object from ObjectInput stream */
+  /**
+   * :: DeveloperApi ::
+   * Read StorageLevel object from ObjectInput stream
+   */
+  @DeveloperApi
   def apply(in: ObjectInput): StorageLevel = {
     val obj = new StorageLevel()
     obj.readExternal(in)


Mime
View raw message