Changeset 27234


Ignore:
Timestamp:
04/19/13 09:56:17 (8 years ago)
Author:
jmt12
Message:

renamed prepare_build_recipe() to the more meaningful prepareIndexRecipe() - plus I prefer java formatting

Location:
gs2-extensions/parallel-building/trunk/src/perllib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/parallelbasebuilder.pm

    r27229 r27234  
    4949# /** new() **/
    5050
    51 # /** @function prepareBuildRecipe()
     51# /** @function prepareIndexRecipe()
     52#  * @param $self
     53#  * @author jmt12
    5254#  */
    53 sub prepareBuildRecipe
     55sub prepareIndexRecipe
    5456{
    5557  my ($self) = @_;
    5658  my $outhandle = $self->{'outhandle'};
    57   print $outhandle "WARNING: prepare_build_recipe() should be implemented in subclass!!";
     59  print $outhandle "WARNING: prepareIndexRecipe() should be implemented in subclass!!";
    5860}
    59 # /** prepareBuildRecipe() **/
     61# /** prepareIndexRecipe() **/
    6062
    61631;
  • gs2-extensions/parallel-building/trunk/src/perllib/parallellucenebuilder.pm

    r27228 r27234  
    2828###########################################################################
    2929
    30 # @author John Thompson, Waikato DL Research group
     30# @author David Bainbridge and Katherine Don, Waikato DL Research group
     31# @author John Rowe, DL Consulting Ltd.
     32# @author John Thompson, DL Consulting Ltd.
     33# @author John Thompson [jmt12], Waikato DL Research group
     34
    3135package parallellucenebuilder;
    3236
     
    4044}
    4145
     46# /** @function new()
     47#  */
    4248sub new
    4349{
     
    4652  return bless($self, $class);
    4753}
     54# /** new() **/
    4855
    49 # The three main 'modes' in Lucene builds are completely independent, while
    50 # index building can be further split by level [jmt12]
    51 sub prepare_build_recipe
     56# /** @function prepareIndexRecipe()
     57#  * The three main 'modes' in Lucene builds are completely independent, while
     58#  * index building can be further split by level
     59#  * @param $self
     60#  * @param $collection
     61#  * @param $recipe a reference to an array of recipe 'steps'
     62#  * @author jmt12
     63#  */
     64sub prepareIndexRecipe
    5265{
    53   my ($self, $collection, $recipe_ref) = @_;
     66  my ($self, $collection, $recipe) = @_;
    5467  my $outhandle = $self->{'outhandle'};
    5568  my $verbosity = $self->{'verbosity'};
    5669  # 1. Compressing the text
    57   push(@{$recipe_ref}, {'command'=>'buildcol.pl -keepold -verbosity ' . $verbosity . ' -mode compress_text ' . $collection});
     70  push(@{$recipe}, {'command'=>'buildcol.pl -keepold -verbosity ' . $verbosity . ' -mode compress_text ' . $collection});
    5871  # 2. Info database building
    59   push(@{$recipe_ref}, {'command'=>'buildcol.pl -keepold -verbosity ' . $verbosity . ' -mode infodb ' . $collection});
     72  push(@{$recipe}, {'command'=>'buildcol.pl -keepold -verbosity ' . $verbosity . ' -mode infodb ' . $collection});
    6073  # 3. Now one command each for each level of index required
    6174  foreach my $level (keys %{$self->{'levels'}})
    6275  {
    63     push(@{$recipe_ref}, {'command'=>'buildcol.pl -keepold -verbosity ' . $verbosity . ' -mode build_index -indexlevel ' . $level . ' ' . $collection});
     76    push(@{$recipe}, {'command'=>'buildcol.pl -keepold -verbosity ' . $verbosity . ' -mode build_index -indexlevel ' . $level . ' ' . $collection});
    6477  }
    6578  # Complete!
    6679}
    67 # /** prepare_build_recipe() **/
     80# /** prepareIndexRecipe() **/
    6881
    69821;
Note: See TracChangeset for help on using the changeset viewer.