Skip to content

Commit

Permalink
make tachyonStore in BlockMananger lazy val; add more comments Storag…
Browse files Browse the repository at this point in the history
…eLevels.
  • Loading branch information
haoyuan committed Mar 22, 2014
1 parent dc8ef24 commit 47304b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public class StorageLevels {

public static final StorageLevel TACHYON = new StorageLevel(false, false, true, false, 1);

/**
* Create a new StorageLevel object.
* @param useDisk saved to disk, if true
* @param useMemory saved to memory, if true
* @param deserialized saved as deserialized objects, if true
* @param replication replication factor
*/
@Deprecated
public static StorageLevel create(boolean useDisk, boolean useMemory, boolean deserialized, int replication) {
return StorageLevel.apply(useDisk, useMemory, false, deserialized, replication);
}
Expand All @@ -45,6 +53,7 @@ public static StorageLevel create(boolean useDisk, boolean useMemory, boolean de
* Create a new StorageLevel object.
* @param useDisk saved to disk, if true
* @param useMemory saved to memory, if true
* @param useTachyon saved to Tachyon, if true
* @param deserialized saved as deserialized objects, if true
* @param replication replication factor
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private[spark] class BlockManager(
var asyncReregisterTask: Future[Unit] = null
val asyncReregisterLock = new Object

private def tachyonStore : TachyonStore = synchronized {
private[storage] lazy val tachyonStore : TachyonStore = {
if (!tachyonInitialized) {
initializeTachyonStore()
}
Expand Down

0 comments on commit 47304b3

Please sign in to comment.