/[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

Contents of /trunk/bin/lorry.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 150 - (show annotations)
Fri Oct 9 17:10:54 2009 UTC (14 years, 7 months ago) by dpavlin
File MIME type: text/plain
File size: 898 byte(s)
fix warning
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use Data::Dump qw(dump);
7 use File::Slurp;
8
9 use lib 'lib';
10 use Sack::From;
11 use Sack::Lorry;
12 use Sack::Color;
13 use Sack;
14
15 use Getopt::Long;
16 use Time::HiRes qw(time);
17
18
19 my $view = 'views/00.demo.pl';
20 my $limit = 0;
21 my $cloud;
22
23
24 GetOptions(
25 'view=s' => \$view,
26 'limit=i' => \$limit,
27 'cloud=s' => \$cloud,
28 ) or die $!;
29
30
31 my $lorry = Sack::Lorry->new( view => $view, cloud => $cloud );
32
33 my $from = Sack::From->new(
34 path => '/data/isi/full.txt',
35 limit => $limit * $lorry->cloud_size,
36 );
37
38 duration 'pre-load finished';
39
40 $lorry->start_nodes;
41
42 duration 'cloud up';
43
44 $lorry->load_nodes( $from );
45
46 duration 'load finished';
47
48
49 our $out;
50 our $cmd;
51
52 do {
53 print "sack> ";
54 $cmd = <STDIN>;
55 last unless defined $cmd; # CTRL+D
56 chomp($cmd);
57 } while $lorry->command($cmd);
58
59 warn "exit all nodes\n";
60 $lorry->send_to_all( { exit => 1 } );
61
62 duration 'total usage';
63

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26