Show
Ignore:
Timestamp:
10.06.2013 14:19:21 (7 years ago)
Author:
jmt12
Message:

Fixing up some minor bugs in regex's

Files:
1 modified

Legend:

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

    r27588 r27589  
    173173      # And job completion... so we can keep parsing other log files as 
    174174      # necessary 
    175       elsif ($line =~ /Job 'job_${job_id} has completed successfully\./) 
     175      elsif ($line =~ /Job job_${job_id} has completed successfully\./) 
    176176      { 
    177177        $job_complete = 1; 
     
    213213  } 
    214214} 
    215 print "Done\n"; 
     215print "   Done\n"; 
    216216 
    217217if (!$job_complete) 
     
    253253    } 
    254254    print CSVOUT $task_number . "," . $attempt_number . "," . $data_local . ",\"" . $compute_node . "\",\"" . join(',', natsort(@splits)) . "\"\n"; 
    255     undef($tid_2_splits->{$task_id}); 
     255    $tid_2_splits->{$task_id} = undef; 
    256256  } 
    257257 
     
    260260  foreach my $task_id (keys %{$tid_2_splits}) 
    261261  { 
    262     my ($job_id, $task_number) = $task_id =~ /^(\d+_\d+)_m_(\d+)/; 
    263     my @splits = @{$tid_2_splits->{$task_id}}; 
    264     print CSVOUT $task_number . ",-1,-1,\"\",\"" . join(',', natsort(@splits)) . "\"\n"; 
     262    if (defined $tid_2_splits->{$task_id}) 
     263    { 
     264      my ($job_id, $task_number) = $task_id =~ /^(\d+_\d+)_m_(\d+)/; 
     265      my @splits = @{$tid_2_splits->{$task_id}}; 
     266      print CSVOUT $task_number . ",-1,-1,\"\",\"" . join(',', natsort(@splits)) . "\"\n"; 
     267    } 
    265268  } 
    266269