Changeset 27583 for gs2-extensions/parallel-building
- Timestamp:
- 2013-06-10T10:22:19+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/bin/script/hadoop_report.pl
r27560 r27583 213 213 $row_counter++; 214 214 # For each compute node record 215 my $known_workers = {}; 215 216 foreach my $worker_id (sort keys %{$node_records}) 216 217 { … … 218 219 my $node_id = $row_counter; 219 220 $row_counter++; 220 print CSVOUT $node_id . ',W' . $node_record->{'cpu'} . ',' . $node_record->{'host'} . ',' . $node_record->{'start'} . ',' . $node_record->{'end'} . ',' . $node_record->{'cpu_time'} . ",0,1,NA\n"; 221 my $csv_worker_id = 'W' . $node_record->{'cpu'}; 222 # Ensure we haven't used this id before - this should never trigger for 223 # multicore CPUs, but will for clusters (as nearly all nodes will report 224 # themselves as 'W0') 225 if (defined $known_workers->{$csv_worker_id}) 226 { 227 # Find a different worker id as this one is already in use 228 my $counter = 0; 229 $csv_worker_id = 'W' . $counter; 230 while (defined $known_workers->{$csv_worker_id}) 231 { 232 $counter++; 233 $csv_worker_id = 'W' . $counter; 234 } 235 } 236 $known_workers->{$csv_worker_id} = 1; 237 print CSVOUT $node_id . ',' . $csv_worker_id . ',' . $node_record->{'host'} . ',' . $node_record->{'start'} . ',' . $node_record->{'end'} . ',' . $node_record->{'cpu_time'} . ",0,1,NA\n"; 221 238 # List the child task records 222 239 foreach my $taskno (sort keys %{$task_records})
Note:
See TracChangeset
for help on using the changeset viewer.