-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Amy Wang
committed
Mar 12, 2015
1 parent
daf20f8
commit 265c1be
Showing
2 changed files
with
57 additions
and
96 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
examples/src/integTest/scala/water/sparkling/itest/yarn/HexDev62Test.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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package water.sparkling.itest.yarn | ||
|
||
import org.apache.spark.examples.h2o.AirlinesParse | ||
import org.apache.spark.h2o._ | ||
import org.apache.spark.sql._ | ||
import org.apache.spark.{SparkContext, SparkConf} | ||
import org.junit.runner.RunWith | ||
import org.scalatest.FunSuite | ||
import org.scalatest.junit.JUnitRunner | ||
import water.sparkling.itest.SparkITest | ||
|
||
/** | ||
* Test suite for given JIRA bug. | ||
*/ | ||
@RunWith(classOf[JUnitRunner]) | ||
class HexDev62TestSuite extends FunSuite with SparkITest { | ||
|
||
ignore("HEX-DEV 62 test") { | ||
launch( "water.sparkling.itest.yarn.HexDev62Test", | ||
env { | ||
sparkMaster("yarn-client") | ||
// Configure YARN environment | ||
conf("spark.yarn.max.executor.failures", 1) // In fail of executor, fail the test | ||
conf("spark.executor.instances", 5) // 10 executor instances | ||
conf("spark.executor.memory", "10g") // 20g per executor | ||
conf("spark.ext.h2o.port.base", 63331) //Start at baseport 63331 | ||
conf("spark.driver.memory", "2g") | ||
conf("spark.executor.cores", 32) //Use up all the cores on the machines | ||
} | ||
) | ||
} | ||
} | ||
|
||
object HexDev62Test { | ||
def main(args: Array[String]): Unit = { | ||
val conf = new SparkConf().setAppName("HexDev62Test") | ||
val sc = new SparkContext(conf) | ||
val h2oContext = new H2OContext(sc).start() | ||
import h2oContext._ | ||
|
||
// Import all year airlines into SPARK | ||
implicit val sqlContext = new SQLContext(sc) | ||
val timer1 = new water.util.Timer | ||
val path = "hdfs://mr-0xd6-precise1.0xdata.loc:8020/datasets/airlines/airlines_all.csv" | ||
val airlinesRaw = sc.textFile(path) | ||
val airlinesRDD = airlinesRaw.map(_.split(",")).map(row => AirlinesParse(row)).filter(!_.isWrongRow()) | ||
val timeToParse = timer1.time/1000 | ||
println("Time it took to parse 116 million airlines = " + timeToParse + "secs") | ||
|
||
// Convert RDD to H2O Frame | ||
val timer2 = new water.util.Timer | ||
val airlinesData : DataFrame = airlinesRDD | ||
val timeToH2O = timer2.time/1000 | ||
println("Time it took to transfer a Spark RDD to H2O Frame = " + timeToH2O + "secs") | ||
sc.stop() | ||
} | ||
} |
96 changes: 0 additions & 96 deletions
96
examples/src/integTest/scala/water/sparkling/itest/yarn/HexDev62TestSuite.scala
This file was deleted.
Oops, something went wrong.