Luca Frosini 2018-05-18 14:36:05 +00:00
parent 97b1b48d46
commit 18534677ff
1 changed files with 25 additions and 16 deletions

View File

@ -39,6 +39,10 @@ public class AccountingDataHarvesterPlugin extends Plugin<DataHarvestPluginDecla
public static final String RERUN_INPUT_PARAMETER = "reRun";
public static final String DRY_RUN_INPUT_PARAMETER = "dryRun";
public static final String SOBIGDATA_CONTEXT = "/d4science.research-infrastructures.eu/SoBigData";
public static final String SOBIGDATA_EU_CONTEXT = "/d4science.research-infrastructures.eu/gCubeApps/SoBigData.eu";
public static final String TAGME_CONTEXT = "/d4science.research-infrastructures.eu/SoBigData/TagMe";
protected Date start;
protected Date end;
@ -154,7 +158,7 @@ public class AccountingDataHarvesterPlugin extends Plugin<DataHarvestPluginDecla
}
try {
// Collecting info on Res. Catalogue (Dataset, Application, Deliverables, Methods)
// Collecting info on Resource Catalogue (Dataset, Application, Deliverables, Methods)
ResourceCatalogueHarvester resourceCatalogueHarvester = new ResourceCatalogueHarvester(start, end);
List<HarvestedData> harvested = resourceCatalogueHarvester.getData();
data.addAll(harvested);
@ -162,22 +166,27 @@ public class AccountingDataHarvesterPlugin extends Plugin<DataHarvestPluginDecla
logger.error("Error harvesting Resource Catalogue Information for {}", context, e);
}
try {
// Collecting info on Data/Method download
DataMethodDownloadHarvester dataMethodDownloadHarvester = new DataMethodDownloadHarvester(start, end);
List<HarvestedData> harvested = dataMethodDownloadHarvester.getData();
data.addAll(harvested);
} catch(Exception e) {
logger.error("Error harvesting Data Method Download for {}", context, e);
}
try {
// Collecting info on method invocation
MethodInvocationHarvester methodInvocationHarvester = new MethodInvocationHarvester(start, end);
List<HarvestedData> harvested = methodInvocationHarvester.getData();
data.addAll(harvested);
} catch(Exception e) {
logger.error("Error harvesting Method Invocations for {}", context, e);
if(context.startsWith(SOBIGDATA_CONTEXT) || context.startsWith(SOBIGDATA_EU_CONTEXT)) {
try {
// Collecting info on Data/Method download
DataMethodDownloadHarvester dataMethodDownloadHarvester = new DataMethodDownloadHarvester(start, end);
List<HarvestedData> harvested = dataMethodDownloadHarvester.getData();
data.addAll(harvested);
} catch(Exception e) {
logger.error("Error harvesting Data Method Download for {}", context, e);
}
if(context.startsWith(TAGME_CONTEXT)) {
try {
// Collecting info on method invocation
MethodInvocationHarvester methodInvocationHarvester = new MethodInvocationHarvester(start, end);
List<HarvestedData> harvested = methodInvocationHarvester.getData();
data.addAll(harvested);
} catch(Exception e) {
logger.error("Error harvesting Method Invocations for {}", context, e);
}
}
}
}