← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20172: Analytics tables, logging

 

------------------------------------------------------------
revno: 20172
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-09-15 20:37:01 +0200
message:
  Analytics tables, logging
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.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-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java	2015-07-02 23:34:24 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java	2015-09-15 18:37:01 +0000
@@ -145,9 +145,9 @@
         clock.logTime( "Vacuumed tables" );
         notifier.notify( taskId, "Swapping analytics tables" );
         
-        swapTables( tables );
+        swapTables( tables, clock, taskId );
         
-        clock.logTime( "Partition tables: " + tables + ", last years: " + lastYears );
+        clock.logTime( "Swapped tables" );
         notifier.notify( taskId, "Clearing caches" );
 
         partitionManager.clearCaches();
@@ -285,14 +285,20 @@
         ConcurrentUtils.waitForCompletion( futures );        
     }
     
-    private void swapTables( List<AnalyticsTable> tables )
+    private void swapTables( List<AnalyticsTable> tables, Clock clock, TaskId taskId )
     {
         resourceTableService.dropAllSqlViews();
         
+        clock.logTime( "Dropped SQL views"  );
+        notifier.notify( taskId, "Swapping tables" );
+        
         for ( AnalyticsTable table : tables )
         {
             tableManager.swapTable( table );
         }
+
+        clock.logTime( "Swapped tables"  );
+        notifier.notify( taskId, "Creating SQL views" );
         
         resourceTableService.createAllSqlViews();
     }