Changeset 27412 for gs2-extensions/parallel-building/trunk/src/bin/script/parse_task_info_from_hadoop_log.pl
- Timestamp:
- 2013-05-24T09:22:13+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/bin/script/parse_task_info_from_hadoop_log.pl
r27124 r27412 99 99 { 100 100 # 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]+)/) 102 102 { 103 103 my $task_id = $job_id . $1; … … 147 147 # 3. Write CSV of information 148 148 print " * Writing Job Information... "; 149 &debugPrint(" AttemptID\tComputeNode\tSucceeded");149 &debugPrint("\nAttemptID\tComputeNode\tSucceeded"); 150 150 foreach my $attempt_id (keys %{$aid_2_node}) 151 151 { … … 157 157 &debugPrint($task_id . "\t" . join(',', natsort(@{$tid_2_splits->{$task_id}}))); 158 158 } 159 159 160 # - open the CSV file and write out the combined information from above 160 161 if (open(CSVOUT, '>:utf8', $data_locality_report_path)) … … 167 168 my $compute_node = $aid_2_node->{$attempt_id}->{'compute_node'}; 168 169 my @splits = @{$tid_2_splits->{$task_id}}; 169 my $data_local = 'N';170 my $data_local = 0; 170 171 if (grep($_ eq $compute_node, @splits)) 171 172 { 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"; 175 176 } 176 177 close(CSVOUT);
Note:
See TracChangeset
for help on using the changeset viewer.