I have this piece of code:
ArrayList<Row> list = new ArrayList<Row>(); Row testRow = RowFactory.create(true, 101.0, "string"); list.add(testRow); JavaRDD<Row> testRDD = JavaSparkContext.parallelize(list);
The following error message appears on the last line of this code:
It is not possible to make a static reference to the non-static method prallelize (List <Row>) of type JavaSparkContext.
How can I improve my code and create a JavaRDD object from my list (which should have multiple Rows). Currently, I do not understand what part of my code is static.
java apache-spark
Guforu
source share