Changeset 30517 for main/trunk/greenstone2/perllib
- Timestamp:
- 2016-05-09T16:53:48+12:00 (8 years ago)
- Location:
- main/trunk/greenstone2/perllib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/DBDrivers/BaseDBDriver.pm
r30370 r30517 57 57 $self->{'supports_persistentconnection'} = 0; 58 58 $self->{'supports_rss'} = 0; 59 $self->{'supports_concurrent_read_and_write'} = 0; 59 60 $self->{'supports_set'} = 0; 60 61 $self->{'write_only'} = 0; # Some drivers are one way - i.e. STDOUTXML … … 383 384 384 385 386 ## @function supportsConcurrentReadAndWrite(void) => integer 387 # 388 sub supportsConcurrentReadAndWrite 389 { 390 my $self = shift(@_); 391 return $self->{'supports_concurrent_read_and_write'}; 392 } 393 ## supportsConcurrentReadAndWrite(void) => integer ## 394 395 385 396 ## @function supportsSet(void) => integer 386 397 # -
main/trunk/greenstone2/perllib/DBDrivers/JDBM.pm
r30370 r30517 50 50 my $self = DBDrivers::70HyphenFormat->new(@_); 51 51 $self->{'default_file_extension'} = 'jdb'; 52 $self->{'supports_concurrent_read_and_write'} = 1; 52 53 53 54 # Executables need a little extra work since we are using Java -
main/trunk/greenstone2/perllib/basebuilder.pm
r28567 r30517 397 397 } 398 398 399 # By default, builders do support make_infodatabase() 400 sub supports_make_infodatabase { 401 return 1; 402 } 399 403 400 404 -
main/trunk/greenstone2/perllib/buildcolutils.pm
r29096 r30517 674 674 # processor [jmt12] 675 675 map { local $_=$_; $_->build_indexes($indexname, $indexlevel); } @builders; 676 map { local $_=$_; $_->make_infodatabase(); } @builders; 676 677 # when incrementally rebuilding a collection using a gdbm database, need to 678 # deactivate the collecitob before make_infodatabase() 679 map { 680 local $_=$_; 681 682 if($_->supports_make_infodatabase()) { 683 my $infodbtype = $_->{'infodbtype'}; 684 my $dbSupportsConcurrentRW = &dbutil::supportsConcurrentReadAndWrite($infodbtype); 685 686 if(!$dbSupportsConcurrentRW) { 687 #$self->{'justdeactivate'} = 1; 688 #$self->activate_collection(); 689 #$self->{'justdeactivate'} = 0; 690 $self->activate_collection("just_deactivate"); 691 } 692 $_->make_infodatabase(); 693 } 694 695 } @builders; 696 677 697 map { local $_=$_; $_->collect_specific(); } @builders; 678 698 } … … 759 779 sub activate_collection 760 780 { 761 my $self = shift(@_); 781 my $self = shift(@_); 782 my $activation_cmd = shift(@_); 783 my($just_activate, $just_deactivate); 784 if(defined $activation_cmd) { 785 $just_deactivate = 1 if($activation_cmd eq "just_deactivate"); 786 $just_activate = 1 if($activation_cmd eq "just_activate"); 787 if($activation_cmd eq "just_deactivate_and_activate") { 788 $just_deactivate = 1; 789 $just_activate = 1; 790 } 791 } 792 762 793 # if buildcol.pl was run with -activate, need to run activate.pl 763 794 # now that building's complete … … 773 804 push(@activate_argv, '-keepold') if ($self->{'keepold'}); 774 805 push(@activate_argv, '-incremental') if ($self->{'incremental'}); 806 push(@activate_argv, '-justactivate') if ($just_activate || $self->{'justactivate'}); 807 push(@activate_argv, '-justdeactivate') if ($just_deactivate || $self->{'justdeactivate'}); 775 808 my $quoted_argv = join(' ', map { "\"$_\"" } @activate_argv); 776 809 my $activatecol_cmd = '"' . &util::get_perl_exec(). '" -S activate.pl ' . $quoted_argv . ' "' . $self->get_collection() . '"'; -
main/trunk/greenstone2/perllib/dbutil.pm
r30489 r30517 532 532 533 533 534 ## @function supportsConcurrentReadAndWrite(string) => boolean 535 # 536 sub supportsConcurrentReadAndWrite 537 { 538 my $infodb_type = shift(@_); 539 my $driver = _loadDBDriver($infodb_type); 540 return $driver->supportsConcurrentReadAndWrite(); 541 } 542 ## supportsConcurrentReadAndWrite(string) => boolean ## 543 544 534 545 ## @function write_infodb_entry(string, *) => void 535 546 # -
main/trunk/greenstone2/perllib/extrabuilder.pm
r24462 r30517 113 113 } 114 114 115 # for now, orthogonalbuilder subclasses don't support/require make_infodatabase() 116 sub supports_make_infodatabase { 117 return 0; 118 } 119 115 120 sub make_infodatabase { 116 121 my $self = shift (@_); -
main/trunk/greenstone2/perllib/inexport.pm
r30489 r30517 1284 1284 if ($existing_f =~ m/^$situated_dir/) { 1285 1285 1286 print STDERR "**** Existing file $existing_f\nis located within\n$situated_dir\n";1286 # print STDERR "**** Existing file $existing_f\nis located within\n$situated_dir\n"; 1287 1287 1288 1288 push(@$reindex_files,$existing_f);
Note:
See TracChangeset
for help on using the changeset viewer.