Hi,

I am writing my Spark application in java and I need to use a
RangePartitioner. 

JavaPairRDD<String, ProgramDataRef> progRef1 =
sc.textFile(programReferenceDataFile, 12).filter(
                                (String s) -> !s.startsWith("#")).mapToPair(
                                (String s) -> {
                                                ProgramDataRef ref = new 
ProgramDataRef(s);
                                                return new Tuple2<String, 
ProgramDataRef>(ref.genre, ref);
                                        }
                                );

RangePartitioner<String, ProgramDataRef> rangePart = new
RangePartitioner<String, ProgramDataRef>(12, progRef1.rdd(), true, ?,
progRef1.kClassTag());

I can't determine how to create the correct object for parameter 4 which is
"scala.math.Ordering<K> evidence$1" from the documentation. From the
scala.math.Ordering code I see there are many implicit objects and one
handles Strings. How can I access them from Java.

Thanks,
Dave.



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-use-scala-math-Ordering-in-java-tp26019.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to