You can specific perf result location.

This commit is contained in:
Yin Huai 2015-08-13 13:40:31 -07:00
parent 11bfdc7c5a
commit 51546868f4
2 changed files with 10 additions and 6 deletions

View File

@ -32,14 +32,14 @@ import org.apache.spark.sql.functions._
*
* @param sqlContext An existing SQLContext.
*/
abstract class Benchmark(@transient protected val sqlContext: SQLContext)
abstract class Benchmark(
@transient protected val sqlContext: SQLContext,
val resultsLocation: String = "/spark/sql/performance",
val resultsTableName: String = "sqlPerformance")
extends Serializable {
import sqlContext.implicits._
val resultsLocation = "/spark/sql/performance"
val resultsTableName = "sqlPerformance"
def createResultsTable() = {
sqlContext.sql(s"DROP TABLE $resultsTableName")
sqlContext.createExternalTable(

View File

@ -23,8 +23,12 @@ import org.apache.spark.sql.SQLContext
* TPC-DS benchmark's dataset.
* @param sqlContext An existing SQLContext.
*/
class TPCDS (@transient sqlContext: SQLContext)
extends Benchmark(sqlContext) with ImpalaKitQueries with SimpleQueries with Serializable {
class TPCDS (
@transient sqlContext: SQLContext,
resultsLocation: String = "/spark/sql/performance",
resultsTableName: String = "sqlPerformance")
extends Benchmark(sqlContext, resultsLocation, resultsTableName)
with ImpalaKitQueries with SimpleQueries with Serializable {
/*
def setupBroadcast(skipTables: Seq[String] = Seq("store_sales", "customer")) = {