amplab / spark-indexedrdd

An efficient updatable key-value store for Apache Spark
Apache License 2.0
250 stars 78 forks source link

To construct indexedRDD in Java #24

Open shijiel opened 7 years ago

shijiel commented 7 years ago

Hi, I try to create an simple indexedRDD in java. Here is my code:

List data = Arrays.asList(1, 2, 3, 4, 5); JavaPairRDD<Long, Integer> distData = sc.parallelize(data).mapToPair(v -> new Tuple2(v.longValue(),0)); IndexedRDD<Long, Integer> mytest = new IndexedRDD<Long, Integer>(distData);

It has some errors, is there anyone help?