@Test(expected = NullPointerException.class) public void readAffiliations_sparkContext_null() { reader.readAffiliations(null, "/aaa"); }
@Override public JavaRDD<AffMatchAffiliation> readAffiliations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<ExtractedDocumentMetadata> sourceAffiliations = sparkAvroLoader .loadJavaRDD(sc, inputPath, ExtractedDocumentMetadata.class); return sourceAffiliations.flatMap(srcAff -> affiliationConverter.convert(srcAff).iterator()); }
IisAffiliationReader implements Serializable, AffiliationReader { @Override public JavaRDD<AffMatchAffiliation> readAffiliations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<ExtractedDocumentMetadata> sourceAffiliations = sparkAvroLoader .loadJavaRDD(sc, inputPath, ExtractedDocumentMetadata.class); return sourceAffiliations.flatMap(srcAff -> affiliationConverter.convert(srcAff).iterator()); } }
IisAffiliationReader implements Serializable, AffiliationReader { @Override public JavaRDD<AffMatchAffiliation> readAffiliations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<ExtractedDocumentMetadata> sourceAffiliations = sparkAvroLoader .loadJavaRDD(sc, inputPath, ExtractedDocumentMetadata.class); return sourceAffiliations.flatMap(srcAff -> affiliationConverter.convert(srcAff).iterator()); }  }
IisAffiliationReader implements Serializable, AffiliationReader { @Override public JavaRDD<AffMatchAffiliation> readAffiliations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<ExtractedDocumentMetadata> sourceAffiliations = sparkAvroLoader .loadJavaRDD(sc, inputPath, ExtractedDocumentMetadata.class); return sourceAffiliations.flatMap(srcAff -> affiliationConverter.convert(srcAff).iterator()); }  @Override JavaRDD<AffMatchAffiliation> readAffiliations(JavaSparkContext sc, String inputPath); }
IisAffiliationReader implements Serializable, AffiliationReader { @Override public JavaRDD<AffMatchAffiliation> readAffiliations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<ExtractedDocumentMetadata> sourceAffiliations = sparkAvroLoader .loadJavaRDD(sc, inputPath, ExtractedDocumentMetadata.class); return sourceAffiliations.flatMap(srcAff -> affiliationConverter.convert(srcAff).iterator()); }  @Override JavaRDD<AffMatchAffiliation> readAffiliations(JavaSparkContext sc, String inputPath);  }