@@ -0,0 +1,1432 @@
+/**%0A * Illustrates loading a sequence file of people and how many pandas they have seen%0A */%0Apackage com.oreilly.learningsparkexamples.java;%0A%0Aimport java.util.List;%0Aimport scala.Tuple2;%0A%0Aimport org.apache.spark.api.java.JavaPairRDD;%0Aimport org.apache.spark.api.java.JavaSparkContext;%0Aimport org.apache.spark.api.java.function.PairFunction;%0Aimport org.apache.hadoop.io.IntWritable;%0Aimport org.apache.hadoop.io.Text;%0A%0Apublic class BasicLoadSequenceFile %7B%0A%0A  public static class ConvertToNativeTypes implements PairFunction%3CTuple2%3CText, IntWritable%3E, String, Integer%3E %7B%0A    public Tuple2%3CString, Integer%3E call(Tuple2%3CText, IntWritable%3E record) %7B%0A      return new Tuple2(record._1.toString(), record._2.get());%0A    %7D%0A  %7D%0A%0A  public static void main(String%5B%5D args) throws Exception %7B%0A%09%09if (args.length != 2) %7B%0A      throw new Exception(%22Usage BasicLoadSequenceFile %5BsparkMaster%5D %5Binput%5D%22);%0A%09%09%7D%0A    String master = args%5B0%5D;%0A    String fileName = args%5B1%5D;%0A%0A%09%09JavaSparkContext sc = new JavaSparkContext(%0A      master, %22basicloadjson%22, System.getenv(%22SPARK_HOME%22), System.getenv(%22JARS%22));%0A    JavaPairRDD%3CText, IntWritable%3E input = sc.sequenceFile(fileName, Text.class, IntWritable.class);%0A    JavaPairRDD%3CString, Integer%3E result = input.mapToPair(new ConvertToNativeTypes());%0A    List%3CTuple2%3CString, Integer%3E%3E resultList = result.collect();%0A    for (Tuple2%3CString, Integer%3E record : resultList) %7B%0A      System.out.println(record);%0A    %7D%0A%09%7D%0A%7D%0A

Add a basic load sequence file example for Java