Class Aggregator
- java.lang.Object
-
- org.gcube.accounting.aggregator.aggregation.Aggregator
-
public class Aggregator extends Object
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description protected FileaggregateRecordsBackupFileprotected AggregationStatusaggregationStatusprotected intestimatedRecordsNumberprotected intmalformedRecordNumberprotected FilemalformedRecordsFileprotected org.gcube.com.fasterxml.jackson.databind.ObjectMapperobjectMapperprotected FileoriginalRecordsbackupFileprotected intoriginalRecordsNumberprotected booleanskipAggregationprotected CalendarstartTime
-
Constructor Summary
Constructors Constructor Description Aggregator(AggregationStatus aggregationStatus, File originalRecordsbackupFile, File aggregateRecordsBackupFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddProperty(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode objectNode, String key, Object value)voidaggregate()protected voidaggregateRow(AggregatorBuffer aggregatorBuffer, String json)protected voidelaborateRow(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode content, AggregatorBuffer aggregatorBuffer)protected CalendargetCalendar(java.time.OffsetDateTime offsetDateTime)protected voidretrieveAndAggregate(ResultSet resultSet)voidsetSkipAggregation(boolean skipAggregation)
-
-
-
Field Detail
-
aggregationStatus
protected final AggregationStatus aggregationStatus
-
originalRecordsbackupFile
protected final File originalRecordsbackupFile
-
aggregateRecordsBackupFile
protected final File aggregateRecordsBackupFile
-
malformedRecordsFile
protected final File malformedRecordsFile
-
estimatedRecordsNumber
protected int estimatedRecordsNumber
-
originalRecordsNumber
protected int originalRecordsNumber
-
malformedRecordNumber
protected int malformedRecordNumber
-
objectMapper
protected org.gcube.com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
startTime
protected Calendar startTime
-
skipAggregation
protected boolean skipAggregation
-
-
Constructor Detail
-
Aggregator
public Aggregator(AggregationStatus aggregationStatus, File originalRecordsbackupFile, File aggregateRecordsBackupFile)
-
-
Method Detail
-
setSkipAggregation
public void setSkipAggregation(boolean skipAggregation)
-
elaborateRow
protected void elaborateRow(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode content, AggregatorBuffer aggregatorBuffer) throws Exception- Throws:
Exception
-
addProperty
protected void addProperty(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode objectNode, String key, Object value)
-
getCalendar
protected Calendar getCalendar(java.time.OffsetDateTime offsetDateTime)
-
retrieveAndAggregate
protected void retrieveAndAggregate(ResultSet resultSet) throws Exception
- Throws:
Exception
-
aggregateRow
protected void aggregateRow(AggregatorBuffer aggregatorBuffer, String json) throws Exception
- Throws:
Exception
-
-