Skip to content

Commit

Permalink
rename the StorgeLevel.TACHYON as StorageLevel.OFF_HEAP
Browse files Browse the repository at this point in the history
  • Loading branch information
RongGu committed Mar 27, 2014
1 parent 76805aa commit c9aeabf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ object StorageLevel {
val MEMORY_AND_DISK_2 = new StorageLevel(true, true, false, true, 2)
val MEMORY_AND_DISK_SER = new StorageLevel(true, true, false, false)
val MEMORY_AND_DISK_SER_2 = new StorageLevel(true, true, false, false, 2)
val TACHYON = new StorageLevel(false, false, true, false)
val OFF_HEAP = new StorageLevel(false, false, true, false)

/** Create a new StorageLevel object */
def apply(useDisk: Boolean, useMemory: Boolean, useTachyon: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,11 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
val a1 = new Array[Byte](400)
val a2 = new Array[Byte](400)
val a3 = new Array[Byte](400)
store.putSingle("a1", a1, StorageLevel.TACHYON)
store.putSingle("a2", a2, StorageLevel.TACHYON)
store.putSingle("a3", a3, StorageLevel.TACHYON)
assert(store.getSingle("a2").isDefined, "a2 was in store")
store.putSingle("a1", a1, StorageLevel.OFF_HEAP)
store.putSingle("a2", a2, StorageLevel.OFF_HEAP)
store.putSingle("a3", a3, StorageLevel.OFF_HEAP)
assert(store.getSingle("a3").isDefined, "a3 was in store")
assert(store.getSingle("a2").isDefined, "a2 was in store")
assert(store.getSingle("a1").isDefined, "a1 was in store")
} else {
info("tachyon storage test disabled.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ object SparkTachyonHdfsLR {
Seq(new InputFormatInfo(conf, classOf[org.apache.hadoop.mapred.TextInputFormat], inputPath))
))
val lines = sc.textFile(inputPath)
val points = lines.map(parsePoint _).persist(StorageLevel.TACHYON)
val points = lines.map(parsePoint _).persist(StorageLevel.OFF_HEAP)
val ITERATIONS = args(2).toInt

// Initialize w to a random value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object SparkTachyonPi {
println("1- Pi is roughly " + 4.0 * count / n)

val rdd2 = spark.parallelize(1 to n, slices)
rdd2.persist(StorageLevel.TACHYON)
rdd2.persist(StorageLevel.OFF_HEAP)
val count2 = rdd2.map { i =>
val x = random * 2 - 1
val y = random * 2 - 1
Expand Down
4 changes: 2 additions & 2 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ object SparkBuild extends Build {
concurrentRestrictions in Global += Tags.limit(Tags.Test, 1),

resolvers ++= Seq(
"Maven Repository" at "https://repo.maven.apache.org/maven2",
"Maven Repository" at "http://repo.maven.apache.org/maven2",
"Apache Repository" at "https://repository.apache.org/content/repositories/releases",
"JBoss Repository" at "https://repository.jboss.org/nexus/content/repositories/releases/",
"MQTT Repository" at "https://repo.eclipse.org/content/repositories/paho-releases/",
"Cloudera Repository" at "https://repository.cloudera.com/artifactory/cloudera-repos/",
"Cloudera Repository" at "http://repository.cloudera.com/artifactory/cloudera-repos/",
// For Sonatype publishing
// "sonatype-snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
// "sonatype-staging" at "https://oss.sonatype.org/service/local/staging/deploy/maven2/",
Expand Down

0 comments on commit c9aeabf

Please sign in to comment.