import_new_mdstores #112
|
@ -100,7 +100,7 @@ public class MigrateHdfsMdstoresApplication extends AbstractMigrationApplication
|
||||||
.map((MapFunction<Row, String>) r -> enrichRecord(r), Encoders.STRING())
|
.map((MapFunction<Row, String>) r -> enrichRecord(r), Encoders.STRING())
|
||||||
.toJavaRDD()
|
.toJavaRDD()
|
||||||
.mapToPair(xml -> new Tuple2<>(new Text(UUID.randomUUID() + ":" + type), new Text(xml)))
|
.mapToPair(xml -> new Tuple2<>(new Text(UUID.randomUUID() + ":" + type), new Text(xml)))
|
||||||
.coalesce(1)
|
// .coalesce(1)
|
||||||
.saveAsHadoopFile(outputPath, Text.class, Text.class, SequenceFileOutputFormat.class, GzipCodec.class);
|
.saveAsHadoopFile(outputPath, Text.class, Text.class, SequenceFileOutputFormat.class, GzipCodec.class);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -419,10 +419,12 @@ public class MappersTest {
|
||||||
|
|
||||||
assertNotNull(d.getTitle());
|
assertNotNull(d.getTitle());
|
||||||
assertEquals(1, d.getTitle().size());
|
assertEquals(1, d.getTitle().size());
|
||||||
assertEquals("Validation of the Goodstrength System for Assessment of Abdominal Wall Strength in Patients With Incisional Hernia", d
|
assertEquals(
|
||||||
.getTitle()
|
"Validation of the Goodstrength System for Assessment of Abdominal Wall Strength in Patients With Incisional Hernia",
|
||||||
.get(0)
|
d
|
||||||
.getValue());
|
.getTitle()
|
||||||
|
.get(0)
|
||||||
|
.getValue());
|
||||||
|
|
||||||
assertNotNull(d.getDescription());
|
assertNotNull(d.getDescription());
|
||||||
assertEquals(1, d.getDescription().size());
|
assertEquals(1, d.getDescription().size());
|
||||||
|
@ -620,7 +622,8 @@ public class MappersTest {
|
||||||
assertEquals("OPEN", p.getInstance().get(0).getAccessright().getClassid());
|
assertEquals("OPEN", p.getInstance().get(0).getAccessright().getClassid());
|
||||||
assertValidId(p.getInstance().get(0).getCollectedfrom().getKey());
|
assertValidId(p.getInstance().get(0).getCollectedfrom().getKey());
|
||||||
assertValidId(p.getInstance().get(0).getHostedby().getKey());
|
assertValidId(p.getInstance().get(0).getHostedby().getKey());
|
||||||
assertEquals("http://creativecommons.org/licenses/by/3.0/de/legalcode", p.getInstance().get(0).getLicense().getValue());
|
assertEquals(
|
||||||
|
"http://creativecommons.org/licenses/by/3.0/de/legalcode", p.getInstance().get(0).getLicense().getValue());
|
||||||
|
|
||||||
assertEquals(1, p.getInstance().size());
|
assertEquals(1, p.getInstance().size());
|
||||||
assertNotNull(p.getInstance().get(0).getAlternateIdentifier());
|
assertNotNull(p.getInstance().get(0).getAlternateIdentifier());
|
||||||
|
@ -702,12 +705,14 @@ public class MappersTest {
|
||||||
|
|
||||||
private List<String> vocs() throws IOException {
|
private List<String> vocs() throws IOException {
|
||||||
return IOUtils
|
return IOUtils
|
||||||
.readLines(GraphCleaningFunctionsTest.class.getResourceAsStream("/eu/dnetlib/dhp/oa/graph/clean/terms.txt"));
|
.readLines(
|
||||||
|
GraphCleaningFunctionsTest.class.getResourceAsStream("/eu/dnetlib/dhp/oa/graph/clean/terms.txt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> synonyms() throws IOException {
|
private List<String> synonyms() throws IOException {
|
||||||
return IOUtils
|
return IOUtils
|
||||||
.readLines(GraphCleaningFunctionsTest.class.getResourceAsStream("/eu/dnetlib/dhp/oa/graph/clean/synonyms.txt"));
|
.readLines(
|
||||||
|
GraphCleaningFunctionsTest.class.getResourceAsStream("/eu/dnetlib/dhp/oa/graph/clean/synonyms.txt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue