Commit 75f1c102 authored by Jeff Rasley's avatar Jeff Rasley
Browse files

Switch data generator to use sql context and not hive context

parent 01f1b9b5
......@@ -3,6 +3,7 @@ package edu.brown.cs.systems.tpcds.spark;
import org.apache.spark.SparkConf;
import org.apache.spark.SparkContext;
import org.apache.spark.sql.hive.HiveContext;
import org.apache.spark.sql.SQLContext;
import com.databricks.spark.sql.perf.tpcds.Tables;
......@@ -29,7 +30,7 @@ public class SparkTPCDSDataGenerator {
public static void generateData(TPCDSSettings settings) {
SparkConf conf = new SparkConf().setAppName("TPC-DS generateData");
SparkContext sc = new SparkContext(conf);
HiveContext sqlContext = new HiveContext(sc);
SQLContext sqlContext = new SQLContext(sc);
Tables tables = new Tables(sqlContext, settings.scaleFactor);
tables.genData(settings.dataLocation, settings.dataFormat, settings.overwrite, settings.partitionTables,
settings.useDoubleForDecimal, settings.clusterByPartitionColumns,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment