aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLiwei Lin <lwlin7@gmail.com>2016-04-02 17:55:46 -0700
committerReynold Xin <rxin@databricks.com>2016-04-02 17:55:46 -0700
commit03d130f9734be66e8aefc4ffaa207ee13e837629 (patch)
treef2d836f861f2f24d813c60023bb1efe6d5cfcb5b /core
parent4a6e78abd9d5edc4a5092738dff0006bbe202a89 (diff)
downloadspark-03d130f9734be66e8aefc4ffaa207ee13e837629.tar.gz
spark-03d130f9734be66e8aefc4ffaa207ee13e837629.tar.bz2
spark-03d130f9734be66e8aefc4ffaa207ee13e837629.zip
[SPARK-14342][CORE][DOCS][TESTS] Remove straggler references to Tachyon
## What changes were proposed in this pull request? Straggler references to Tachyon were removed: - for docs, `tachyon` has been generalized as `off-heap memory`; - for Mesos test suits, the key-value `tachyon:true`/`tachyon:false` has been changed to `os:centos`/`os:ubuntu`, since `os` is an example constrain used by the [Mesos official docs](http://mesos.apache.org/documentation/attributes-resources/). ## How was this patch tested? Existing test suites. Author: Liwei Lin <lwlin7@gmail.com> Closes #12129 from lw-lin/tachyon-cleanup.
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/org/apache/spark/api/java/StorageLevels.java4
-rw-r--r--core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala4
-rw-r--r--core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtilsSuite.scala32
3 files changed, 20 insertions, 20 deletions
diff --git a/core/src/main/java/org/apache/spark/api/java/StorageLevels.java b/core/src/main/java/org/apache/spark/api/java/StorageLevels.java
index 666c797738..23673d3e3d 100644
--- a/core/src/main/java/org/apache/spark/api/java/StorageLevels.java
+++ b/core/src/main/java/org/apache/spark/api/java/StorageLevels.java
@@ -39,8 +39,8 @@ public class StorageLevels {
/**
* Create a new StorageLevel object.
* @param useDisk saved to disk, if true
- * @param useMemory saved to memory, if true
- * @param useOffHeap saved to Tachyon, if true
+ * @param useMemory saved to on-heap memory, if true
+ * @param useOffHeap saved to off-heap memory, if true
* @param deserialized saved as deserialized objects, if true
* @param replication replication factor
*/
diff --git a/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala b/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
index 35f914355d..233bdc23e6 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
@@ -283,11 +283,11 @@ private[mesos] trait MesosSchedulerUtils extends Logging {
* are separated by ':'. The ':' implies equality (for singular values) and "is one of" for
* multiple values (comma separated). For example:
* {{{
- * parseConstraintString("tachyon:true;zone:us-east-1a,us-east-1b")
+ * parseConstraintString("os:centos7;zone:us-east-1a,us-east-1b")
* // would result in
* <code>
* Map(
- * "tachyon" -> Set("true"),
+ * "os" -> Set("centos7"),
* "zone": -> Set("us-east-1a", "us-east-1b")
* )
* }}}
diff --git a/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtilsSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtilsSuite.scala
index 85437b2f80..ceb3a52983 100644
--- a/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtilsSuite.scala
+++ b/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtilsSuite.scala
@@ -59,10 +59,10 @@ class MesosSchedulerUtilsSuite extends SparkFunSuite with Matchers with MockitoS
test("parse a non-empty constraint string correctly") {
val expectedMap = Map(
- "tachyon" -> Set("true"),
+ "os" -> Set("centos7"),
"zone" -> Set("us-east-1a", "us-east-1b")
)
- utils.parseConstraintString("tachyon:true;zone:us-east-1a,us-east-1b") should be (expectedMap)
+ utils.parseConstraintString("os:centos7;zone:us-east-1a,us-east-1b") should be (expectedMap)
}
test("parse an empty constraint string correctly") {
@@ -71,35 +71,35 @@ class MesosSchedulerUtilsSuite extends SparkFunSuite with Matchers with MockitoS
test("throw an exception when the input is malformed") {
an[IllegalArgumentException] should be thrownBy
- utils.parseConstraintString("tachyon;zone:us-east")
+ utils.parseConstraintString("os;zone:us-east")
}
test("empty values for attributes' constraints matches all values") {
- val constraintsStr = "tachyon:"
+ val constraintsStr = "os:"
val parsedConstraints = utils.parseConstraintString(constraintsStr)
- parsedConstraints shouldBe Map("tachyon" -> Set())
+ parsedConstraints shouldBe Map("os" -> Set())
val zoneSet = Value.Set.newBuilder().addItem("us-east-1a").addItem("us-east-1b").build()
- val noTachyonOffer = Map("zone" -> zoneSet)
- val tachyonTrueOffer = Map("tachyon" -> Value.Text.newBuilder().setValue("true").build())
- val tachyonFalseOffer = Map("tachyon" -> Value.Text.newBuilder().setValue("false").build())
+ val noOsOffer = Map("zone" -> zoneSet)
+ val centosOffer = Map("os" -> Value.Text.newBuilder().setValue("centos").build())
+ val ubuntuOffer = Map("os" -> Value.Text.newBuilder().setValue("ubuntu").build())
- utils.matchesAttributeRequirements(parsedConstraints, noTachyonOffer) shouldBe false
- utils.matchesAttributeRequirements(parsedConstraints, tachyonTrueOffer) shouldBe true
- utils.matchesAttributeRequirements(parsedConstraints, tachyonFalseOffer) shouldBe true
+ utils.matchesAttributeRequirements(parsedConstraints, noOsOffer) shouldBe false
+ utils.matchesAttributeRequirements(parsedConstraints, centosOffer) shouldBe true
+ utils.matchesAttributeRequirements(parsedConstraints, ubuntuOffer) shouldBe true
}
test("subset match is performed for set attributes") {
val supersetConstraint = Map(
- "tachyon" -> Value.Text.newBuilder().setValue("true").build(),
+ "os" -> Value.Text.newBuilder().setValue("ubuntu").build(),
"zone" -> Value.Set.newBuilder()
.addItem("us-east-1a")
.addItem("us-east-1b")
.addItem("us-east-1c")
.build())
- val zoneConstraintStr = "tachyon:;zone:us-east-1a,us-east-1c"
+ val zoneConstraintStr = "os:;zone:us-east-1a,us-east-1c"
val parsedConstraints = utils.parseConstraintString(zoneConstraintStr)
utils.matchesAttributeRequirements(parsedConstraints, supersetConstraint) shouldBe true
@@ -131,10 +131,10 @@ class MesosSchedulerUtilsSuite extends SparkFunSuite with Matchers with MockitoS
}
test("equality match is performed for text attributes") {
- val offerAttribs = Map("tachyon" -> Value.Text.newBuilder().setValue("true").build())
+ val offerAttribs = Map("os" -> Value.Text.newBuilder().setValue("centos7").build())
- val trueConstraint = utils.parseConstraintString("tachyon:true")
- val falseConstraint = utils.parseConstraintString("tachyon:false")
+ val trueConstraint = utils.parseConstraintString("os:centos7")
+ val falseConstraint = utils.parseConstraintString("os:ubuntu")
utils.matchesAttributeRequirements(trueConstraint, offerAttribs) shouldBe true
utils.matchesAttributeRequirements(falseConstraint, offerAttribs) shouldBe false