Hi All, I am new to Spark and i am trying to do some BlockMatrix operations with the Mllib API's. But i can't seem to create a BlockMatrix with the java API. I tried the following
Matrix matrixa = Matrices.rand(4, 4, new Random(1000)); List<Tuple2<Tuple2<Integer,Integer>,Matrix>> list = new ArrayList<Tuple2<Tuple2<Integer, Integer>, Matrix>>(); Tuple2<Integer,Integer> intTuple = new Tuple2<Integer, Integer>(0,0); Tuple2<Tuple2<Integer,Integer>,Matrix> tuple2MatrixTuple2 = new Tuple2<Tuple2<Integer, Integer>, Matrix>(intTuple,matrixa ); list.add(tuple2MatrixTuple2); JavaRDD<Tuple2<Tuple2<Integer, Integer>, Matrix>> rdd = sc.parallelize(list); BlockMatrix blockMatrix = new BlockMatrix(rdd,2,2); but since BlockMatrix only takes "RDD<scala.Tuple2<scala.Tuple2<java.lang.Object,java.lang.Object>,Matrix>>" this code does not work. sc.parallelize() returns a JavaRDD so the two are not compatible. I also couldn't find any code samples for this. Any help on this would be highly appreciated. Best Regards, Pulasthi -- Pulasthi S. Wickramasinghe Graduate Student | Research Assistant School of Informatics and Computing | Digital Science Center Indiana University, Bloomington cell: 224-386-9035