@Test(expected = NullPointerException.class) public void readOrganizations_sparkContext_null() { reader.readOrganizations(null, "/aaa"); }
@Override public JavaRDD<AffMatchOrganization> readOrganizations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<Organization> sourceOrganizations = sparkAvroLoader.loadJavaRDD(sc, inputPath, Organization.class); JavaRDD<AffMatchOrganization> organizations = sourceOrganizations.map(srcOrg -> organizationConverter.convert(srcOrg)); return organizations; }
IisOrganizationReader implements Serializable, OrganizationReader { @Override public JavaRDD<AffMatchOrganization> readOrganizations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<Organization> sourceOrganizations = sparkAvroLoader.loadJavaRDD(sc, inputPath, Organization.class); JavaRDD<AffMatchOrganization> organizations = sourceOrganizations.map(srcOrg -> organizationConverter.convert(srcOrg)); return organizations; } }
IisOrganizationReader implements Serializable, OrganizationReader { @Override public JavaRDD<AffMatchOrganization> readOrganizations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<Organization> sourceOrganizations = sparkAvroLoader.loadJavaRDD(sc, inputPath, Organization.class); JavaRDD<AffMatchOrganization> organizations = sourceOrganizations.map(srcOrg -> organizationConverter.convert(srcOrg)); return organizations; }  }
IisOrganizationReader implements Serializable, OrganizationReader { @Override public JavaRDD<AffMatchOrganization> readOrganizations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<Organization> sourceOrganizations = sparkAvroLoader.loadJavaRDD(sc, inputPath, Organization.class); JavaRDD<AffMatchOrganization> organizations = sourceOrganizations.map(srcOrg -> organizationConverter.convert(srcOrg)); return organizations; }  @Override JavaRDD<AffMatchOrganization> readOrganizations(JavaSparkContext sc, String inputPath); }
IisOrganizationReader implements Serializable, OrganizationReader { @Override public JavaRDD<AffMatchOrganization> readOrganizations(JavaSparkContext sc, String inputPath) { Preconditions.checkNotNull(sc); Preconditions.checkArgument(StringUtils.isNotBlank(inputPath)); JavaRDD<Organization> sourceOrganizations = sparkAvroLoader.loadJavaRDD(sc, inputPath, Organization.class); JavaRDD<AffMatchOrganization> organizations = sourceOrganizations.map(srcOrg -> organizationConverter.convert(srcOrg)); return organizations; }  @Override JavaRDD<AffMatchOrganization> readOrganizations(JavaSparkContext sc, String inputPath);  }