@Test public void readDocumentProjects() throws Exception { JavaRDD<AffMatchDocumentProject> retDocumentProject = documentProjectReader.readDocumentProjects(sparkContext, predefinedPath); assertTrue(retDocumentProject == documentProjects); verify(avroLoader).loadJavaRDD(sparkContext, predefinedPath, DocumentToProject.class); verify(loadedDocumentProjects).map(mapDocumentProjectFunction.capture()); assertMapDocumentProjectFunction(mapDocumentProjectFunction.getValue()); }
@Override public JavaRDD<AffMatchDocumentProject> readDocumentProjects(JavaSparkContext sc, String inputPath) { return avroLoader.loadJavaRDD(sc, inputPath, DocumentToProject.class) .map(srcDocProj -> converter.convert(srcDocProj)); }
IisInferredDocumentProjectReader implements DocumentProjectReader { @Override public JavaRDD<AffMatchDocumentProject> readDocumentProjects(JavaSparkContext sc, String inputPath) { return avroLoader.loadJavaRDD(sc, inputPath, DocumentToProject.class) .map(srcDocProj -> converter.convert(srcDocProj)); } }
IisInferredDocumentProjectReader implements DocumentProjectReader { @Override public JavaRDD<AffMatchDocumentProject> readDocumentProjects(JavaSparkContext sc, String inputPath) { return avroLoader.loadJavaRDD(sc, inputPath, DocumentToProject.class) .map(srcDocProj -> converter.convert(srcDocProj)); }  }
IisInferredDocumentProjectReader implements DocumentProjectReader { @Override public JavaRDD<AffMatchDocumentProject> readDocumentProjects(JavaSparkContext sc, String inputPath) { return avroLoader.loadJavaRDD(sc, inputPath, DocumentToProject.class) .map(srcDocProj -> converter.convert(srcDocProj)); }  @Override JavaRDD<AffMatchDocumentProject> readDocumentProjects(JavaSparkContext sc, String inputPath); void setAvroLoader(SparkAvroLoader avroLoader); void setDocumentProjectConverter(InferredDocumentProjectConverter converter); }
IisInferredDocumentProjectReader implements DocumentProjectReader { @Override public JavaRDD<AffMatchDocumentProject> readDocumentProjects(JavaSparkContext sc, String inputPath) { return avroLoader.loadJavaRDD(sc, inputPath, DocumentToProject.class) .map(srcDocProj -> converter.convert(srcDocProj)); }  @Override JavaRDD<AffMatchDocumentProject> readDocumentProjects(JavaSparkContext sc, String inputPath); void setAvroLoader(SparkAvroLoader avroLoader); void setDocumentProjectConverter(InferredDocumentProjectConverter converter);  }