git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-aggregator-se-plugin@141805 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ec7773313a
commit
27c4848eeb
|
@ -32,9 +32,8 @@ public class Aggregation {
|
|||
//count buffer records
|
||||
protected int totalBufferedRecords;
|
||||
|
||||
//list Aggregate record
|
||||
//TODO RIMETTERE A PROTECTED
|
||||
public Map<String, List<AggregatedRecord<?,?>>> bufferedRecords = new HashMap<String, List<AggregatedRecord<?,?>>>();
|
||||
//list Aggregate record
|
||||
protected Map<String, List<AggregatedRecord<?,?>>> bufferedRecords = new HashMap<String, List<AggregatedRecord<?,?>>>();
|
||||
|
||||
|
||||
|
||||
|
@ -86,7 +85,7 @@ public class Aggregation {
|
|||
try {
|
||||
AggregatedRecord bufferedAggregatedRecord = (AggregatedRecord) bufferedRecord;
|
||||
// TODO check compatibility using getAggregable
|
||||
logger.debug("if -- madeAggregation aggregate");
|
||||
//logger.debug("if -- madeAggregation aggregate");
|
||||
bufferedAggregatedRecord.aggregate((AggregatedRecord) record);
|
||||
//patch for not changed a creation time
|
||||
//bufferedAggregatedRecord.setCreationTime(bufferedAggregatedRecord.getStartTime());
|
||||
|
@ -101,7 +100,7 @@ public class Aggregation {
|
|||
|
||||
if(!found){
|
||||
//logger.debug("Aggregated Record not found with execption");
|
||||
logger.debug("if -- madeAggregation not found with execption add");
|
||||
//logger.debug("if -- madeAggregation not found with execption add");
|
||||
records.add(record);
|
||||
totalBufferedRecords++;
|
||||
return;
|
||||
|
@ -111,10 +110,10 @@ public class Aggregation {
|
|||
//logger.debug("else if record contains "+recordType);
|
||||
records = new ArrayList<AggregatedRecord<?,?>>();
|
||||
try {
|
||||
logger.debug("else -- add getAggregatedRecord");
|
||||
//logger.debug("else -- add getAggregatedRecord");
|
||||
records.add(getAggregatedRecord(record));
|
||||
} catch (Exception e) {
|
||||
logger.debug("else -- add Exception");
|
||||
//logger.debug("else -- add Exception");
|
||||
records.add(record);
|
||||
}
|
||||
totalBufferedRecords++;
|
||||
|
|
|
@ -349,8 +349,7 @@ public class AccountingAggregatorPlugin extends Plugin<AccountingAggregatorPlugi
|
|||
* @throws Exception
|
||||
*/
|
||||
protected boolean elaborateRow(ViewRow row ,List<JsonDocument> documentElaborate) throws Exception{
|
||||
int i=0;
|
||||
int size=aggregate.bufferedRecords.size();
|
||||
int i=0;
|
||||
try {
|
||||
//patch for field of long type
|
||||
String document=row.value().toString().replace("\":", "=").replace("\"", "");
|
||||
|
@ -385,8 +384,6 @@ public class AccountingAggregatorPlugin extends Plugin<AccountingAggregatorPlugi
|
|||
logger.error("record is not elaborated:"+row.toString()+" but it will be persisted");
|
||||
logger.error("error elaborateRow", e);
|
||||
logger.error("i:{}",i);
|
||||
logger.error("size before:{}, after buffer size:{}",size,aggregate.bufferedRecords.size());
|
||||
//throw e;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue