dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10771
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2960: Dropping and adding index in completeness export process
------------------------------------------------------------
revno: 2960
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-03-02 00:48:07 +0100
message:
Dropping and adding index in completeness export process
modified:
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java 2011-03-01 23:29:00 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java 2011-03-01 23:48:07 +0000
@@ -153,10 +153,16 @@
{
log.info( "Data completeness export process started" );
+ completenessStore.dropIndex();
+
+ log.info( "Dropped potential index" );
+
int days = (Integer) systemSettingManager.getSystemSetting( KEY_COMPLETENESS_OFFSET, DEFAULT_COMPLETENESS_OFFSET );
completenessStore.deleteDataSetCompleteness( dataSetIds, periodIds, organisationUnitIds );
+ log.info( "Deleted existing completeness data" );
+
BatchHandler<DataSetCompletenessResult> batchHandler = batchHandlerFactory.createBatchHandler( DataSetCompletenessResultBatchHandler.class );
batchHandler.init();
@@ -202,6 +208,10 @@
batchHandler.flush();
+ completenessStore.createIndex();
+
+ log.info( "Created index" );
+
log.info( "Completeness export process done" );
}