Ignore:
Timestamp:
2015-12-16T16:15:39+13:00 (8 years ago)
Author:
jmt12
Message:

Extending manifest v2 support to allow for directories to be listed in manifest. Matched with changes in Directory plugin to allow paths into systems like HDFS to be listed in manifest.cd

File:
1 edited

Legend:

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

    r30292 r30354  
    190190    my $self = { 'xml' => 0, 'mode' => $mode };
    191191
    192     print "INFO: This inexport.pm supports version 2 manifest files\n";
    193 
    194192    # general options available to all plugins
    195193    my $arguments = $options->{'args'};
     
    201199    print STDERR "Something went wrong during parsing the arguments. Scroll up for details.\n";
    202200    die "\n";
     201    }
     202
     203    if ($self->{'verbosity'} > 2) {
     204    print "[INFO] This inexport.pm supports version 2 manifest files\n";
     205    }
     206    if ($self->{'verbosity'} > 3) {
     207    print '[DEBUG] Perl @INC: ' . join(", ", @INC) . "\n";
    203208    }
    204209
     
    735740    else
    736741    {
    737       print STDERR "Skipping global file scan due to manifest and complexmeta configuration\n";
     742      print STDERR "Skipping import directory-level global file scan due to manifest and complexmeta configuration\n";
    738743    }
    739744
     
    757762        : &FileUtils::filenameConcatenate($importdir,$df);
    758763
    759         if (-d $full_df) {
     764        if (-d $full_df && $self->{'manifest_version'} != 2) {
    760765        &add_dir_contents_to_list($full_df, \@full_deleted_files);
    761766        } else {
     
    783788        : &FileUtils::filenameConcatenate($importdir,$rf);
    784789
    785         if (-d $full_rf) {
     790        if (-d $full_rf && $self->{'manifest_version'} != 2) {
    786791        &add_dir_contents_to_list($full_rf, \@full_reindex_files);
    787792        } else {
     
    814819        : &FileUtils::filenameConcatenate($importdir,$nf);
    815820
    816         if (-d $full_nf) {
     821        if (-d $full_nf && $self->{'manifest_version'} != 2) {
    817822        &add_dir_contents_to_list($full_nf, \@full_new_files);
    818823        } else {
     
    885890        foreach my $file_to_import (keys %{$block_hash->{'reindex_files'}}, keys %{$block_hash->{'new_files'}})
    886891        {
    887         $self->{'directoryplugin'}->read_for_manifest_v2($pluginfo, $file_to_import, $block_hash, $processor, $gli);
     892        if (&FileUtils::directoryExists($file_to_import)) {
     893#       print "DEBUG: Directory to import: \"" . $file_to_import . "\"\n";
     894        &plugin::file_block_read($pluginfo, '', $file_to_import, $block_hash, $metadata, $gli);
     895#       print "\n===== BLOCK HASH =====\n";
     896#       Dump($block_hash);
     897#       print "\n=====            =====\n\n";
     898        $self->perform_process_files($manifest, $pluginfo, $importdir, $file_to_import, $block_hash, $metadata, $processor, $maxdocs);
     899        }
     900        else
     901        {
     902#       print "DEBUG: File to import: \"" . $file_to_import . "\"\n";
     903        $self->{'directoryplugin'}->read_for_manifest_v2($pluginfo, $file_to_import, $block_hash, $processor, $gli);
     904        }
    888905        }
    889906      }
Note: See TracChangeset for help on using the changeset viewer.