Is there synchronous way to predict against model for real time data

2016-12-15 Thread suyog choudhari
Hi, I have question about, how can I real time make decision using a model I have created with Spark ML. 1. I have some data and created model using it. // Train the model val model = new LogisticRegressionWithLBFGS().setNumClasses(2).run( trainingData) 2. I believe, I can use spark

Re: Counting distinct values for a key?

2015-07-19 Thread suyog choudhari
the use of the DISTINCT keyword in the query equivalent ). Thanks Nikunj On Sun, Jul 19, 2015 at 2:37 PM, suyog choudhari suyogchoudh...@gmail.com wrote: public static void main(String[] args) { SparkConf sparkConf = new SparkConf().setAppName(CountDistinct); JavaSparkContext jsc = new

Re: Counting distinct values for a key?

2015-07-19 Thread suyog choudhari
public static void main(String[] args) { SparkConf sparkConf = new SparkConf().setAppName(CountDistinct); JavaSparkContext jsc = new JavaSparkContext(sparkConf); ListTuple2String, String list = new ArrayListTuple2String, String(); list.add(new Tuple2String, String(key1, val1));