21
21
import org .scify .jedai .utilities .datastructures .AbstractDuplicatePropagation ;
22
22
import org .scify .jedai .utilities .enumerations .BlockBuildingMethod ;
23
23
24
+ import java .nio .channels .FileLock ;
24
25
import java .util .ArrayList ;
25
26
import java .util .List ;
26
27
@@ -403,7 +404,7 @@ private ClustersPerformance executeFullBlockingBasedWorkflow(Label statusLabel)
403
404
*/
404
405
private ClustersPerformance executeFullJoinBasedWorkflow (Label statusLabel ) {
405
406
// todo: make this method use addBlocksPerformance()...
406
- double overheadStart = System .currentTimeMillis ();
407
+ float overheadStart = System .currentTimeMillis ();
407
408
boolean isDirtyEr = erType .equals (JedaiOptions .DIRTY_ER );
408
409
409
410
// Similarity Join
@@ -429,7 +430,7 @@ private ClustersPerformance executeFullJoinBasedWorkflow(Label statusLabel) {
429
430
entityClusters = ec .getDuplicates (simPairs );
430
431
431
432
// Create clusters performance
432
- double overheadEnd = System .currentTimeMillis ();
433
+ float overheadEnd = System .currentTimeMillis ();
433
434
ClustersPerformance clp = new ClustersPerformance (entityClusters , duplicatePropagation );
434
435
clp .setStatistics ();
435
436
clp .printStatistics (overheadEnd - overheadStart , ec .getMethodName (), ec .getMethodConfiguration ());
@@ -475,7 +476,7 @@ private ClustersPerformance executeFullProgressiveWorkflow(Label statusLabel) {
475
476
476
477
// Print performance
477
478
double totalTime = overheadEnd - overheadStart ;
478
- blp .printStatistics (totalTime , bb .getMethodConfiguration (), bb .getMethodName ());
479
+ blp .printStatistics (( float ) totalTime , bb .getMethodConfiguration (), bb .getMethodName ());
479
480
480
481
// Save the performance of block building
481
482
this .addBlocksPerformance (bb .getMethodName (), totalTime , blp );
@@ -526,7 +527,7 @@ private ClustersPerformance executeFullProgressiveWorkflow(Label statusLabel) {
526
527
// Get original recall
527
528
ClustersPerformance clp = new ClustersPerformance (originalClusters , duplicatePropagation );
528
529
clp .setStatistics ();
529
- clp .printStatistics (overheadEnd - overheadStart , ec .getMethodName (), ec .getMethodConfiguration ());
530
+ clp .printStatistics (( float ) ( overheadEnd - overheadStart ) , ec .getMethodName (), ec .getMethodConfiguration ());
530
531
originalRecall = clp .getRecall ();
531
532
}
532
533
@@ -605,7 +606,7 @@ private ClustersPerformance executeFullProgressiveWorkflow(Label statusLabel) {
605
606
Comparison comparison = prioritization .next ();
606
607
607
608
// Calculate the similarity
608
- double similarity = entityMatching .executeComparison (comparison );
609
+ float similarity = entityMatching .executeComparison (comparison );
609
610
comparison .setUtilityMeasure (similarity );
610
611
611
612
sims .addComparison (comparison );
@@ -631,7 +632,7 @@ private ClustersPerformance executeFullProgressiveWorkflow(Label statusLabel) {
631
632
632
633
// Print clustering performance
633
634
if (clp != null ) {
634
- clp .printStatistics (overheadEnd - overheadStart , ec .getMethodName (),
635
+ clp .printStatistics (( float ) ( overheadEnd - overheadStart ) , ec .getMethodName (),
635
636
ec .getMethodConfiguration ());
636
637
637
638
// Add prioritization performance step for workbench
@@ -790,7 +791,7 @@ private List<AbstractBlock> runBlockProcessing(AbstractDuplicatePropagation duPr
790
791
blp = new BlocksPerformance (blocks , duProp );
791
792
blp .setStatistics ();
792
793
793
- double totalTime = overheadEnd - overheadStart ;
794
+ float totalTime = ( float ) ( overheadEnd - overheadStart ) ;
794
795
blp .printStatistics (totalTime , currentMethod .getMethodConfiguration (),
795
796
currentMethod .getMethodName ());
796
797
@@ -900,7 +901,7 @@ private ClustersPerformance runBlockingBasedWorkflow(Label statusLabel, ISchemaC
900
901
blp = new BlocksPerformance (blocks , duplicatePropagation );
901
902
blp .setStatistics ();
902
903
if (finalRun ) {
903
- double totalTime = overheadEnd - overheadStart ;
904
+ float totalTime =( float ) ( overheadEnd - overheadStart ) ;
904
905
905
906
// Print performance
906
907
blp .printStatistics (totalTime , bb .getMethodConfiguration (), bb .getMethodName ());
@@ -963,7 +964,7 @@ private ClustersPerformance runBlockingBasedWorkflow(Label statusLabel, ISchemaC
963
964
ClustersPerformance clp = new ClustersPerformance (entityClusters , duplicatePropagation );
964
965
clp .setStatistics ();
965
966
if (finalRun )
966
- clp .printStatistics (overheadEnd - overheadStart , ec .getMethodName (),
967
+ clp .printStatistics (( float )( overheadEnd - overheadStart ) , ec .getMethodName (),
967
968
ec .getMethodConfiguration ());
968
969
969
970
return clp ;
@@ -976,10 +977,10 @@ private ClustersPerformance runBlockingBasedWorkflow(Label statusLabel, ISchemaC
976
977
* @return Number of comparisons
977
978
*/
978
979
private double getTotalComparisons (List <AbstractBlock > blocks ) {
979
- double originalComparisons = 0 ;
980
+ float originalComparisons = 0 ;
980
981
originalComparisons = blocks .stream ()
981
982
.map (AbstractBlock ::getNoOfComparisons )
982
- .reduce (originalComparisons , Double ::sum );
983
+ .reduce (originalComparisons , Float ::sum );
983
984
System .out .println ("Original comparisons\t :\t " + originalComparisons );
984
985
return originalComparisons ;
985
986
}
@@ -1143,7 +1144,7 @@ private ClustersPerformance runStepByStepWorkflow(Label statusLabel, boolean ran
1143
1144
1144
1145
blp = new BlocksPerformance (blocks , duplicatePropagation );
1145
1146
blp .setStatistics ();
1146
- blp .printStatistics (totalTimeMillis , bb .getMethodConfiguration (),
1147
+ blp .printStatistics (( float ) totalTimeMillis , bb .getMethodConfiguration (),
1147
1148
bb .getMethodName ());
1148
1149
this .addBlocksPerformance (bb .getMethodName (), totalTimeMillis , blp );
1149
1150
@@ -1187,7 +1188,7 @@ private ClustersPerformance runStepByStepWorkflow(Label statusLabel, boolean ran
1187
1188
1188
1189
blp = new BlocksPerformance (cleanedBlocks , duplicatePropagation );
1189
1190
blp .setStatistics ();
1190
- blp .printStatistics (totalTimeMillis , bp .getMethodConfiguration (), bp .getMethodName ());
1191
+ blp .printStatistics (( float ) totalTimeMillis , bp .getMethodConfiguration (), bp .getMethodName ());
1191
1192
this .addBlocksPerformance (bp .getMethodName (), totalTimeMillis , blp );
1192
1193
1193
1194
// Increment index
@@ -1211,7 +1212,7 @@ private ClustersPerformance runStepByStepWorkflow(Label statusLabel, boolean ran
1211
1212
1212
1213
blp = new BlocksPerformance (finalBlocks , duplicatePropagation );
1213
1214
blp .setStatistics ();
1214
- blp .printStatistics (totalTimeMillis , comparisonCleaningMethod .getMethodConfiguration (),
1215
+ blp .printStatistics (( float ) totalTimeMillis , comparisonCleaningMethod .getMethodConfiguration (),
1215
1216
comparisonCleaningMethod .getMethodName ());
1216
1217
this .addBlocksPerformance (comparisonCleaningMethod .getMethodName (), totalTimeMillis , blp );
1217
1218
@@ -1335,7 +1336,7 @@ private ClustersPerformance runStepByStepWorkflow(Label statusLabel, boolean ran
1335
1336
final ClustersPerformance clp = new ClustersPerformance (entityClusters , duplicatePropagation );
1336
1337
clp .setStatistics ();
1337
1338
// todo: Could set the entire configuration details instead of entity clustering method name & config.
1338
- clp .printStatistics (totalTimeMillis , ec .getMethodName (), ec .getMethodConfiguration ());
1339
+ clp .printStatistics (( float ) totalTimeMillis , ec .getMethodName (), ec .getMethodConfiguration ());
1339
1340
1340
1341
return clp ;
1341
1342
}
0 commit comments