I am using sparksessions read().json method to read the json file before converting it to parquet file and it is working fine but the .json(JAVARDD) method is showing as deprecated method. Can we have alternative method for this. Using currently java : spark version 2.4.3
I have gone through the documentation of spark library but did not get any alternative method
JavaSparkContext sc1 = JavaSparkContext.fromSparkContext(SparkContext.getOrCreate());
JavaRDD<String> rddData = sc1.parallelize(data);
Dataset<Row> dataDF = spark.read().json(rddData);
Here .json method is showing as deprecated method ? Can we have alternative method for this.
I've gone through How to parse JSON in Spark with fasterxml without SparkSQL?
and here they suggest SqlContext method which is also deprecated.
Need to know alterntive method of .json in java spark.read().json(JAVARDD object)