removing not needed method
This commit is contained in:
parent
52a6e2f7ff
commit
2fe2f0aa9e
|
@ -162,57 +162,6 @@ public class ExtendProjectTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void selectEoscResults() throws Exception {
|
|
||||||
|
|
||||||
final String sourcePath = getClass()
|
|
||||||
.getResource("/eu/dnetlib/dhp/oa/graph/dump/eosc/input")
|
|
||||||
.getPath();
|
|
||||||
|
|
||||||
final String workingPath = getClass()
|
|
||||||
.getResource("/eu/dnetlib/dhp/oa/graph/dump/eosc/working/")
|
|
||||||
.getPath();
|
|
||||||
|
|
||||||
final JavaSparkContext sc = JavaSparkContext.fromSparkContext(spark.sparkContext());
|
|
||||||
|
|
||||||
spark
|
|
||||||
.read()
|
|
||||||
.textFile(workingPath + "publication")
|
|
||||||
.write()
|
|
||||||
.text(workingDir.toString() + "/working/publicationextendedaffiliation");
|
|
||||||
|
|
||||||
spark
|
|
||||||
.read()
|
|
||||||
.textFile(workingPath + "preparedInfo")
|
|
||||||
.write()
|
|
||||||
.text(workingDir.toString() + "/working/preparedInfo");
|
|
||||||
|
|
||||||
ExtendEoscResultWithOrganizationStep2.main(new String[] {
|
|
||||||
"-isSparkSessionManaged", Boolean.FALSE.toString(),
|
|
||||||
"-outputPath", workingDir.toString() + "/",
|
|
||||||
"-sourcePath", sourcePath,
|
|
||||||
"-resultType", "publication",
|
|
||||||
"-workingPath", workingDir.toString() + "/working/"
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
JavaRDD<Organization> tmp = sc
|
|
||||||
.textFile(workingDir.toString() + "/organization")
|
|
||||||
.map(item -> OBJECT_MAPPER.readValue(item, Organization.class));
|
|
||||||
|
|
||||||
JavaRDD<Relation> rels = sc
|
|
||||||
.textFile(workingDir.toString() + "/resultProject")
|
|
||||||
.map(item -> OBJECT_MAPPER.readValue(item, Relation.class));
|
|
||||||
|
|
||||||
System.out.println(tmp.count());
|
|
||||||
|
|
||||||
Assertions.assertEquals(2, tmp.count());
|
|
||||||
|
|
||||||
Assertions.assertEquals(2, rels.count());
|
|
||||||
|
|
||||||
rels.foreach(r -> Assertions.assertTrue(r.getSource().startsWith("50|")));
|
|
||||||
rels.foreach(r -> Assertions.assertTrue(r.getTarget().startsWith("20|")));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue