Creating a Java Object in Scala
问题 I have a Java class "Listings". I use this in my Java MapReduce job as below: public void map(Object key, Text value, Context context) throws IOException, InterruptedException { Listings le = new Listings(value.toString()); ... } I want to run the same job on Spark. So, I am writing this in Scala now. I imported the Java class: import src.main.java.lists.Listings I want to create a Listings object in Scala. I am doing this: val file_le = sc.textFile("file// Path to file") Listings lists = new