Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into mos-bt-dev
- Loading branch information
Showing
268 changed files
with
200 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
*~ | ||
*.swp | ||
build | ||
work | ||
*.iml | ||
.idea/ | ||
/build/ | ||
work/ | ||
out/ | ||
.DS_Store | ||
third_party/libmesos.so | ||
third_party/libmesos.dylib | ||
conf/java-opts | ||
conf/spark-env.sh | ||
conf/log4j.properties | ||
target/ | ||
reports/ | ||
.project | ||
.classpath | ||
.scala_dependencies | ||
lib_managed/ | ||
src_managed/ | ||
project/boot/ | ||
project/plugins/project/build.properties | ||
project/build/target/ | ||
project/plugins/target/ | ||
project/plugins/lib_managed/ | ||
project/plugins/src_managed/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 16 additions & 1 deletion
17
src/test/spark/repl/ReplSuite.scala → ...src/test/scala/spark/repl/ReplSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/examples/BroadcastTest.scala → .../scala/spark/examples/BroadcastTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import spark.SparkContext | ||
|
||
object BroadcastTest { | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/CpuHog.scala → ...rc/main/scala/spark/examples/CpuHog.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import spark._ | ||
|
||
object CpuHog { | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/HdfsTest.scala → .../main/scala/spark/examples/HdfsTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import spark._ | ||
|
||
object HdfsTest { | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/LocalALS.scala → .../main/scala/spark/examples/LocalALS.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import java.util.Random | ||
import scala.math.sqrt | ||
import cern.jet.math._ | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/LocalFileLR.scala → ...in/scala/spark/examples/LocalFileLR.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import java.util.Random | ||
import Vector._ | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
src/examples/LocalLR.scala → ...c/main/scala/spark/examples/LocalLR.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import java.util.Random | ||
import Vector._ | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
src/examples/LocalPi.scala → ...c/main/scala/spark/examples/LocalPi.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import scala.math.random | ||
import spark._ | ||
import SparkContext._ | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/SleepJob.scala → .../main/scala/spark/examples/SleepJob.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import spark._ | ||
|
||
object SleepJob { | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/SparkALS.scala → .../main/scala/spark/examples/SparkALS.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import java.io.Serializable | ||
import java.util.Random | ||
import scala.math.sqrt | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/SparkHdfsLR.scala → ...in/scala/spark/examples/SparkHdfsLR.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import java.util.Random | ||
import scala.math.exp | ||
import Vector._ | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/SparkLR.scala → ...c/main/scala/spark/examples/SparkLR.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import java.util.Random | ||
import scala.math.exp | ||
import Vector._ | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/SparkPi.scala → ...c/main/scala/spark/examples/SparkPi.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
import scala.math.random | ||
import spark._ | ||
import SparkContext._ | ||
|
2 changes: 2 additions & 0 deletions
2
src/examples/Vector.scala → ...rc/main/scala/spark/examples/Vector.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package spark.examples | ||
|
||
@serializable class Vector(val elements: Array[Double]) { | ||
def length = elements.length | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#Project properties | ||
#Sat Nov 13 21:57:32 PST 2010 | ||
project.organization=UC Berkeley | ||
project.name=Spark | ||
sbt.version=0.7.5.RC0 | ||
project.version=0.0.0 | ||
build.scala.versions=2.8.1 | ||
project.initialize=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import sbt._ | ||
import sbt.Process._ | ||
|
||
import assembly._ | ||
|
||
import de.element34.sbteclipsify._ | ||
|
||
|
||
class SparkProject(info: ProjectInfo) | ||
extends ParentProject(info) with IdeaProject | ||
{ | ||
lazy val core = project("core", "Spark Core", new CoreProject(_)) | ||
|
||
lazy val examples = | ||
project("examples", "Spark Examples", new ExamplesProject(_), core) | ||
|
||
class CoreProject(info: ProjectInfo) | ||
extends DefaultProject(info) with Eclipsify with IdeaProject with DepJar with XmlTestReport | ||
{} | ||
|
||
class ExamplesProject(info: ProjectInfo) | ||
extends DefaultProject(info) with Eclipsify with IdeaProject | ||
{} | ||
} | ||
|
||
|
||
// Project mixin for an XML-based ScalaTest report. Unfortunately | ||
// there is currently no way to call this directly from SBT without | ||
// executing a subprocess. | ||
trait XmlTestReport extends BasicScalaProject { | ||
def testReportDir = outputPath / "test-report" | ||
|
||
lazy val testReport = task { | ||
log.info("Creating " + testReportDir + "...") | ||
if (!testReportDir.exists) { | ||
testReportDir.asFile.mkdirs() | ||
} | ||
log.info("Executing org.scalatest.tools.Runner...") | ||
val command = ("scala -classpath " + testClasspath.absString + | ||
" org.scalatest.tools.Runner -o " + | ||
" -u " + testReportDir.absolutePath + | ||
" -p " + (outputPath / "test-classes").absolutePath) | ||
Process(command, path("."), "JAVA_OPTS" -> "-Xmx500m") ! | ||
|
||
None | ||
}.dependsOn(compile, testCompile).describedAs("Generate XML test report.") | ||
} | ||
|
||
|
||
// Project mixin for creating a JAR with a project's dependencies. This is based | ||
// on the AssemblyBuilder plugin, but because this plugin attempts to package Scala | ||
// and our project too, we leave that out using our own exclude filter (depJarExclude). | ||
trait DepJar extends AssemblyBuilder { | ||
def depJarExclude(base: PathFinder) = { | ||
(base / "scala" ** "*") +++ // exclude scala library | ||
(base / "spark" ** "*") +++ // exclude Spark classes | ||
((base / "META-INF" ** "*") --- // generally ignore the hell out of META-INF | ||
(base / "META-INF" / "services" ** "*") --- // include all service providers | ||
(base / "META-INF" / "maven" ** "*")) // include all Maven POMs and such | ||
} | ||
|
||
def depJarTempDir = outputPath / "dep-classes" | ||
|
||
def depJarOutputPath = | ||
outputPath / (name.toLowerCase.replace(" ", "-") + "-dep-" + version.toString + ".jar") | ||
|
||
lazy val depJar = { | ||
packageTask( | ||
Path.lazyPathFinder(assemblyPaths(depJarTempDir, | ||
assemblyClasspath, | ||
assemblyExtraJars, | ||
depJarExclude)), | ||
depJarOutputPath, | ||
packageOptions) | ||
}.dependsOn(compile).describedAs("Bundle project's dependencies into a JAR.") | ||
} |
Oops, something went wrong.