[Bio] / Sprout / ERDBLoader.pl Repository:
ViewVC logotype

Diff of /Sprout/ERDBLoader.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11, Thu May 28 18:06:58 2009 UTC revision 1.13, Tue Sep 8 21:30:33 2009 UTC
# Line 35  Line 35 
35    
36  =head2 Introduction  =head2 Introduction
37    
38  This script finishes the database load process begun by [[ERDBGeneratorPl]].  This script finishes the database load process begun by L<ERDBGenerator.pl>.
39    
40  [[ERDBGeneratorPl]] divides the source data into sections, and generates a  L<ERDBGenerator.pl> divides the source data into sections, and generates a
41  partial load file for each section of each table. To finish the load process, we  partial load file for each section of each table. To finish the load process, we
42  need to combine the partial files into single files and load the resulting  need to combine the partial files into single files and load the resulting
43  single files into the database tables.  single files into the database tables.
44    
45  Like [[ERDBGeneratorPl]], this script acts on load groups-- sets of related  Like L<ERDBGenerator.pl>, this script acts on load groups-- sets of related
46  tables that are loaded at the same time. For each table in a named group that  tables that are loaded at the same time. For each table in a named group that
47  does not exist in the database, the script first attempts to find a completed  does not exist in the database, the script first attempts to find a completed
48  data file. If one does not exist, it attempts to create one by collating section  data file. If one does not exist, it attempts to create one by collating section
# Line 96  Line 96 
96  =item keepSections  =item keepSections
97    
98  If specified, section files (the fragments of data load files created by  If specified, section files (the fragments of data load files created by
99  [[ERDBGeneratorPl]], will not be deleted after they are collated.  L<ERDBGenerator.pl>, will not be deleted after they are collated.
100    
101  =item warn  =item warn
102    
# Line 149  Line 149 
149      # Get the parameters.      # Get the parameters.
150      my ($database, @groups) = @parameters;      my ($database, @groups) = @parameters;
151      # Connect to the database and get its load directory.      # Connect to the database and get its load directory.
152      my $erdb = ERDB::GetDatabase($database, undef, %$options);      my $erdb = ERDB::GetDatabase($database, undef, %$options, externalDBD => 1);
153      # Fix the group list.      # Fix the group list.
154      my @realGroups = ERDBLoadGroup::ComputeGroups($erdb, \@groups);      my @realGroups = ERDBLoadGroup::ComputeGroups($erdb, \@groups);
155      # Get the source object and load directory for this database.      # Get the source object and load directory for this database.
# Line 278  Line 278 
278          $stats->Add("groups-loaded" => 1);          $stats->Add("groups-loaded" => 1);
279          $stats->Add('load-time' => 1);          $stats->Add('load-time' => 1);
280      }      }
281        # Save the DBD.
282        Trace("Saving DBD.") if T(2);
283        $erdb->InternalizeDBD();
284      $stats->Add('total-time' => time() - $totalStart);      $stats->Add('total-time' => time() - $totalStart);
285      # Display the statistics from this run.      # Display the statistics from this run.
286      Trace("Statistics for load:\n" . $stats->Show()) if T(2);      Trace("Statistics for load:\n" . $stats->Show()) if T(2);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.13

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3