Ignore:
Timestamp:
2013-06-21T12:24:54+12:00 (11 years ago)
Author:
jmt12
Message:

in the case of multiple attempts you need to retain the information about data location tips - whereas I was undefining it after the first task with that id (assuming they were unique). Also added in a check that data location tips are defined for a task before accessing them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/bin/script/parse_task_info_from_hadoop_log.pl

    r27589 r27685  
    246246    my $task_id = $job_id . '_m_' . $task_number;
    247247    my $compute_node = $aid_2_node->{$attempt_id}->{'compute_node'};
    248     my @splits = @{$tid_2_splits->{$task_id}};
    249     my $data_local = 0;
    250     if (grep($_ eq $compute_node, @splits))
    251     {
    252       $data_local = 1;
    253     }
    254     print CSVOUT $task_number . "," . $attempt_number . "," . $data_local . ",\"" . $compute_node . "\",\"" . join(',', natsort(@splits)) . "\"\n";
    255     $tid_2_splits->{$task_id} = undef;
     248    if (defined $tid_2_splits->{$task_id})
     249    {
     250      my @splits = @{$tid_2_splits->{$task_id}};
     251      my $data_local = 0;
     252      if (grep($_ eq $compute_node, @splits))
     253      {
     254        $data_local = 1;
     255      }
     256      print CSVOUT $task_number . "," . $attempt_number . "," . $data_local . ",\"" . $compute_node . "\",\"" . join(',', natsort(@splits)) . "\"\n";
     257    }
     258    else
     259    {
     260      print "Warning! Missing data location information for task: " . $task_id . "\n";
     261    }
    256262  }
    257263
Note: See TracChangeset for help on using the changeset viewer.