Reuse Hadoop code in Spark efficiently?
问题 hi,I have code written in Hadoop and now I try to migrate to Spark. The mappers and reducers are fairly complex. So I tried to reuse Mapper and Reducer classes of already existing Hadoop code inside spark program. Can somebody tell me how do I achieve this? EDIT: So far, I have been able to reuse mapper class of standard hadoop word-count example in spark, implemented as below wordcount.java import scala.Tuple2; import org.apache.spark.SparkConf; import org.apache.spark.api.java.*; import org