code formatting

This commit is contained in:
Claudio Atzori 2020-04-23 18:51:38 +02:00
parent 5414236644
commit 278fc9d276
1 changed files with 27 additions and 7 deletions

View File

@ -118,7 +118,9 @@ public class SparkDedupTest implements Serializable {
"/eu/dnetlib/dhp/dedup/conf/ds.curr.conf.json"))); "/eu/dnetlib/dhp/dedup/conf/ds.curr.conf.json")));
lenient() lenient()
.when(isLookUpService.getResourceProfileByQuery(Mockito.contains("otherresearchproduct"))) .when(
isLookUpService.getResourceProfileByQuery(
Mockito.contains("otherresearchproduct")))
.thenReturn( .thenReturn(
IOUtils.toString( IOUtils.toString(
SparkDedupTest.class.getResourceAsStream( SparkDedupTest.class.getResourceAsStream(
@ -164,7 +166,11 @@ public class SparkDedupTest implements Serializable {
long orp_simrel = long orp_simrel =
spark.read() spark.read()
.load(testOutputBasePath + "/" + testActionSetId + "/otherresearchproduct_simrel") .load(
testOutputBasePath
+ "/"
+ testActionSetId
+ "/otherresearchproduct_simrel")
.count(); .count();
assertEquals(3432, orgs_simrel); assertEquals(3432, orgs_simrel);
@ -213,7 +219,11 @@ public class SparkDedupTest implements Serializable {
long orp_mergerel = long orp_mergerel =
spark.read() spark.read()
.load(testOutputBasePath + "/" + testActionSetId + "/otherresearchproduct_mergerel") .load(
testOutputBasePath
+ "/"
+ testActionSetId
+ "/otherresearchproduct_mergerel")
.count(); .count();
assertEquals(1276, orgs_mergerel); assertEquals(1276, orgs_mergerel);
@ -254,7 +264,8 @@ public class SparkDedupTest implements Serializable {
testOutputBasePath testOutputBasePath
+ "/" + "/"
+ testActionSetId + testActionSetId
+ "/publication_deduprecord").count(); + "/publication_deduprecord")
.count();
long sw_deduprecord = long sw_deduprecord =
jsc.textFile(testOutputBasePath + "/" + testActionSetId + "/software_deduprecord") jsc.textFile(testOutputBasePath + "/" + testActionSetId + "/software_deduprecord")
.count(); .count();
@ -262,7 +273,11 @@ public class SparkDedupTest implements Serializable {
jsc.textFile(testOutputBasePath + "/" + testActionSetId + "/dataset_deduprecord") jsc.textFile(testOutputBasePath + "/" + testActionSetId + "/dataset_deduprecord")
.count(); .count();
long orp_deduprecord = long orp_deduprecord =
jsc.textFile(testOutputBasePath + "/" + testActionSetId + "/otherresearchproduct_deduprecord") jsc.textFile(
testOutputBasePath
+ "/"
+ testActionSetId
+ "/otherresearchproduct_deduprecord")
.count(); .count();
assertEquals(82, orgs_deduprecord); assertEquals(82, orgs_deduprecord);
@ -296,7 +311,8 @@ public class SparkDedupTest implements Serializable {
long datasource = jsc.textFile(testDedupGraphBasePath + "/datasource").count(); long datasource = jsc.textFile(testDedupGraphBasePath + "/datasource").count();
long softwares = jsc.textFile(testDedupGraphBasePath + "/software").count(); long softwares = jsc.textFile(testDedupGraphBasePath + "/software").count();
long dataset = jsc.textFile(testDedupGraphBasePath + "/dataset").count(); long dataset = jsc.textFile(testDedupGraphBasePath + "/dataset").count();
long otherresearchproduct = jsc.textFile(testDedupGraphBasePath + "/otherresearchproduct").count(); long otherresearchproduct =
jsc.textFile(testDedupGraphBasePath + "/otherresearchproduct").count();
long mergedOrgs = long mergedOrgs =
spark.read() spark.read()
@ -340,7 +356,11 @@ public class SparkDedupTest implements Serializable {
long mergedOrp = long mergedOrp =
spark.read() spark.read()
.load(testOutputBasePath + "/" + testActionSetId + "/otherresearchproduct_mergerel") .load(
testOutputBasePath
+ "/"
+ testActionSetId
+ "/otherresearchproduct_mergerel")
.as(Encoders.bean(Relation.class)) .as(Encoders.bean(Relation.class))
.where("relClass=='merges'") .where("relClass=='merges'")
.javaRDD() .javaRDD()