@@ -0,0 +1,1515 @@
+package com.parquet;%0A%0Aimport com.richstonedt.nokia_api.peopleflow.Record;%0Aimport org.apache.spark.SparkConf;%0Aimport org.apache.spark.api.java.JavaSparkContext;%0Aimport org.apache.spark.api.java.function.FlatMapFunction;%0Aimport org.apache.spark.api.java.function.Function;%0A%0Aimport java.text.ParseException;%0Aimport java.util.ArrayList;%0Aimport java.util.Iterator;%0A%0A/**%0A * Created by yangpy on 2017/8/23.%0A */%0Apublic class MultifileRDD %7B%0A    public static void main(String%5B%5D args) %7B%0A        SparkConf sparkConf = new SparkConf().setAppName(%22Highway20MinStatistics%22).setMaster(%22local%5B12%5D%22);%0A        JavaSparkContext sparkContext = new JavaSparkContext(sparkConf);%0A%0A        System.out.println(sparkContext.textFile(%22d:/tmp/data*.json%22).mapPartitions(new FlatMapFunction%3CIterator%3CString%3E, Record%3E() %7B%0A            @Override%0A            public Iterable%3CRecord%3E call(Iterator%3CString%3E iterator) throws Exception %7B%0A                ArrayList%3CRecord%3E result = new ArrayList%3C%3E();%0A                while (iterator.hasNext()) %7B%0A                    try %7B%0A                        result.add(new Record(iterator.next()));%0A                    %7D catch (ParseException %7C ArrayIndexOutOfBoundsException e) %7B%0A                    %7D%0A                %7D%0A                return result;%0A            %7D%0A        %7D).filter(new Function%3CRecord, Boolean%3E() %7B%0A            @Override%0A            public Boolean call(Record record) throws Exception %7B%0A                return (%2213538796630%22.equals(record.getPhone()));%0A            %7D%0A        %7D).count());%0A    %7D%0A%7D%0A

Add mutifile rdd test.