@Test public void test() throws Exception { DataStreamWriterExample.main(null); }
public static void main(String[] args) throws Exception { SparkConf conf = new SparkConf().setAppName("SparkLink!").setMaster("local"); JavaSparkContext jsc = new JavaSparkContext(conf); SQLContext sqlContext = new SQLContext(jsc); int seed = 1234; int nInstances = 1000; int nDiscreteAtts=3; int nContinuousAttributes = 2; DataSpark data = DataSetGenerator .generate( jsc, seed, nInstances, nDiscreteAtts, nContinuousAttributes ); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.json", sqlContext); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.parquet", sqlContext); }
DataStreamWriterExample { public static void main(String[] args) throws Exception { SparkConf conf = new SparkConf().setAppName("SparkLink!").setMaster("local"); JavaSparkContext jsc = new JavaSparkContext(conf); SQLContext sqlContext = new SQLContext(jsc); int seed = 1234; int nInstances = 1000; int nDiscreteAtts=3; int nContinuousAttributes = 2; DataSpark data = DataSetGenerator .generate( jsc, seed, nInstances, nDiscreteAtts, nContinuousAttributes ); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.json", sqlContext); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.parquet", sqlContext); } }
DataStreamWriterExample { public static void main(String[] args) throws Exception { SparkConf conf = new SparkConf().setAppName("SparkLink!").setMaster("local"); JavaSparkContext jsc = new JavaSparkContext(conf); SQLContext sqlContext = new SQLContext(jsc); int seed = 1234; int nInstances = 1000; int nDiscreteAtts=3; int nContinuousAttributes = 2; DataSpark data = DataSetGenerator .generate( jsc, seed, nInstances, nDiscreteAtts, nContinuousAttributes ); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.json", sqlContext); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.parquet", sqlContext); }  }
DataStreamWriterExample { public static void main(String[] args) throws Exception { SparkConf conf = new SparkConf().setAppName("SparkLink!").setMaster("local"); JavaSparkContext jsc = new JavaSparkContext(conf); SQLContext sqlContext = new SQLContext(jsc); int seed = 1234; int nInstances = 1000; int nDiscreteAtts=3; int nContinuousAttributes = 2; DataSpark data = DataSetGenerator .generate( jsc, seed, nInstances, nDiscreteAtts, nContinuousAttributes ); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.json", sqlContext); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.parquet", sqlContext); }  static void main(String[] args); }
DataStreamWriterExample { public static void main(String[] args) throws Exception { SparkConf conf = new SparkConf().setAppName("SparkLink!").setMaster("local"); JavaSparkContext jsc = new JavaSparkContext(conf); SQLContext sqlContext = new SQLContext(jsc); int seed = 1234; int nInstances = 1000; int nDiscreteAtts=3; int nContinuousAttributes = 2; DataSpark data = DataSetGenerator .generate( jsc, seed, nInstances, nDiscreteAtts, nContinuousAttributes ); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.json", sqlContext); DataSparkWriter.writeDataToFolder(data, "datasets/simulated/randomData.parquet", sqlContext); }  static void main(String[] args);  }