66 |
limit => $limit, |
limit => $limit, |
67 |
); |
); |
68 |
|
|
69 |
|
our $num_records = $input->size; |
70 |
|
|
71 |
sub report { |
sub report { |
72 |
my $description = shift; |
my $description = shift; |
255 |
|
|
256 |
while (1) { |
while (1) { |
257 |
|
|
258 |
warn "NODE $listen ready - wating for connection\n"; |
warn "NODE $listen ready - path: $path offset: $offset limit: $limit #recs: $num_records\n"; |
259 |
|
|
260 |
my $client = $sock->accept(); |
my $client = $sock->accept(); |
261 |
|
|
273 |
run_code $header[1] => $content; |
run_code $header[1] => $content; |
274 |
send_sock $client => freeze $out; |
send_sock $client => freeze $out; |
275 |
} elsif ( $header[0] eq 'info' ) { |
} elsif ( $header[0] eq 'info' ) { |
276 |
my $info = "$listen\t$offset\t$limit\t$path"; |
my $info = "$listen\t$offset\t$limit\t$num_records\t$path"; |
277 |
$info .= "\t" . eval $header[1] if $header[1]; |
$info .= "\t" . eval $header[1] if $header[1]; |
278 |
warn "info $info\n"; |
warn "info $info\n"; |
279 |
send_sock $client => $info; |
send_sock $client => $info; |
312 |
send_nodes 'info' => $2; |
send_nodes 'info' => $2; |
313 |
|
|
314 |
my @info = ( |
my @info = ( |
315 |
"node\toffset\tlimit\tpath", |
"node\toffset\tlimit\t#recs\tpath", |
316 |
"----\t------\t-----\t----", |
"----\t------\t-----\t-----\t----", |
317 |
"0\t$offset\t$limit\t$path", |
"0\t$offset\t$limit\t$num_records\t$path", |
318 |
); |
); |
319 |
|
|
320 |
push @info, get_node $_ foreach @nodes; |
push @info, get_node $_ foreach @nodes; |