Added patch to support old model which uses usageRecordType instead recortType field.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-aggregator-se-plugin@153060 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9c0a14ae7b
commit
d0ce92e10a
|
@ -116,8 +116,11 @@ public class Aggregator {
|
||||||
|
|
||||||
int originalRecordsCounter = 0;
|
int originalRecordsCounter = 0;
|
||||||
for (ViewRow row : viewResult) {
|
for (ViewRow row : viewResult) {
|
||||||
|
try {
|
||||||
String record = row.document().content().toString();
|
String record = row.document().content().toString();
|
||||||
|
|
||||||
|
record.replace("usageRecordType", "recordType");
|
||||||
|
|
||||||
// Backup the Record on local file
|
// Backup the Record on local file
|
||||||
Utility.printLine(originalRecordsbackupFile, record);
|
Utility.printLine(originalRecordsbackupFile, record);
|
||||||
|
|
||||||
|
@ -132,6 +135,10 @@ public class Aggregator {
|
||||||
logger.info("{} At the moment, the elaborated original records are {}. The Aggregated records are {}. Difference {}. We are recovering {}% of Documents",
|
logger.info("{} At the moment, the elaborated original records are {}. The Aggregated records are {}. Difference {}. We are recovering {}% of Documents",
|
||||||
aggregationStatus.getAggregationInfo(), originalRecordsCounter, aggregatedRecordsNumber, diff, percentage);
|
aggregationStatus.getAggregationInfo(), originalRecordsCounter, aggregatedRecordsNumber, diff, percentage);
|
||||||
}
|
}
|
||||||
|
}catch (Exception e) {
|
||||||
|
logger.error("Unable to elaborate {} {}", ViewRow.class.getSimpleName(), row, e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Calendar end = Utility.getUTCCalendarInstance();
|
Calendar end = Utility.getUTCCalendarInstance();
|
||||||
|
|
Loading…
Reference in New Issue