Logging every 1% elaborated rows when the total number is greatest than 1000000

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-aggregator-se-plugin@164545 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2018-02-23 09:55:54 +00:00
parent e8b6dfcc50
commit 19d7dc83e7
1 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,7 @@ public abstract class DocumentElaboration {
protected static final String ID = Record.ID;
protected static final int THRESHOLD_FOR_FIVE_PERCENT = 100000;
protected static final int THRESHOLD_FOR_ONE_PERCENT = 1000000;
public static final int MAX_RETRY = 7;
@ -66,6 +67,10 @@ public abstract class DocumentElaboration {
percentOfNumberOfRows = percentOfNumberOfRows / 2;
}
if(rowToBeElaborated >= THRESHOLD_FOR_ONE_PERCENT) {
percentOfNumberOfRows = percentOfNumberOfRows / 5;
}
int elaborated = 0;
String line;
// Read File Line By Line