/[Sack]/trunk/bin/lorry.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/lorry.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 93 by dpavlin, Sat Oct 3 21:43:34 2009 UTC revision 95 by dpavlin, Sun Oct 4 12:17:52 2009 UTC
# Line 18  my @cloud  = ( 'localhost', 'localhost' Line 18  my @cloud  = ( 'localhost', 'localhost'
18    
19  my $lorry = Sack::Lorry->new;  my $lorry = Sack::Lorry->new;
20    
21    my $from  = Sack::From->new(
22            path => '/data/isi/full.txt',
23            limit => $limit * scalar @cloud,
24    );
25    
26  my $info;  my $info;
27    
28  foreach my $host ( @cloud ) {  foreach my $host ( @cloud ) {
# Line 25  foreach my $host ( @cloud ) { Line 30  foreach my $host ( @cloud ) {
30    
31                  warn "started [$port] on $host\n";                  warn "started [$port] on $host\n";
32    
33                  my $data = Sack::From->shard( path => '/data/isi/full.txt', offset => $offset, limit => $limit );                  my $data = $from->shard( $limit );
   
34                  $lorry->send_to( $port, { data => $data } ) || die "can't send to $port: $!";                  $lorry->send_to( $port, { data => $data } ) || die "can't send to $port: $!";
35    
36                  $info->{$port} = {                  $info->{$port} = {
37                          host => $host,                          host => $host,
38                          offset => $offset,                          offset => $offset,

Legend:
Removed from v.93  
changed lines
  Added in v.95

  ViewVC Help
Powered by ViewVC 1.1.26