Changeset 27412

Show
Ignore:
Timestamp:
24.05.2013 09:22:13 (6 years ago)
Author:
jmt12
Message:

I obviously hadn't run this script on Karearea before - assumed all compute nodes to have a name ending '.local' when parsing. Yeah, so that won't happen.

Files:
1 modified

Legend:

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

    r27124 r27412  
    9999  { 
    100100    # Tips provide a match between task and file splits 
    101     if ($line =~ /tip:task_${job_id}(_m_\d+) has split on node:\/default-rack\/([^\.]+).local/) 
     101    if ($line =~ /tip:task_${job_id}(_m_\d+) has split on node:\/default-rack\/([^\.\r\n]+)/) 
    102102    { 
    103103      my $task_id = $job_id . $1; 
     
    147147# 3. Write CSV of information 
    148148print " * Writing Job Information... "; 
    149 &debugPrint("AttemptID\tComputeNode\tSucceeded"); 
     149&debugPrint("\nAttemptID\tComputeNode\tSucceeded"); 
    150150foreach my $attempt_id (keys %{$aid_2_node}) 
    151151{ 
     
    157157  &debugPrint($task_id . "\t" . join(',', natsort(@{$tid_2_splits->{$task_id}}))); 
    158158} 
     159 
    159160# - open the CSV file and write out the combined information from above 
    160161if (open(CSVOUT, '>:utf8', $data_locality_report_path)) 
     
    167168    my $compute_node = $aid_2_node->{$attempt_id}->{'compute_node'}; 
    168169    my @splits = @{$tid_2_splits->{$task_id}}; 
    169     my $data_local = 'N'; 
     170    my $data_local = 0; 
    170171    if (grep($_ eq $compute_node, @splits)) 
    171172    { 
    172       $data_local = 'Y'; 
    173     } 
    174     print CSVOUT $task_number . "," . $attempt_number . "," . $data_local . "," . $compute_node . ",\"" . join(',', natsort(@splits)) . "\"\n"; 
     173      $data_local = 1; 
     174    } 
     175    print CSVOUT $task_number . "," . $attempt_number . "," . $data_local . ",\"" . $compute_node . "\",\"" . join(',', natsort(@splits)) . "\"\n"; 
    175176  } 
    176177  close(CSVOUT);