GRID::Cluster::Result - The object managing the result of a GRID::Cluster remote command execution
The result of a call to a remote command, for example using methods copyandmake or chdir of GRID::Cluster, is a reference to a GRID::Cluster::Result object. This kind of object is responsible for obtaining the results for each machine that is part of a GRID::Cluster object.
copyandmake
chdir
GRID::Cluster
These results allow to identify which machines has finished the execution of a remote command satisfactorily, and in which ones a failure has occurred.
A GRID::Cluster::Result object contains, mainly, a hash with keys the names of the different machines and values the corresponding GRID::Machine::Result objects.
GRID::Cluster::Result
new
Syntax:
my $r = GRID::Cluster::Result->new();
It builds a new result object. No parameters are required.
add
$r->add( host_name => $_, machine_result => $machine_result );
This method adds a GRID::Machine::Result object to an existing GRID::Cluster::Result object. The parameters are:
GRID::Machine::Result
host_name: A string containing the name of a machine.
host_name
machine_result: A reference to a GRID::Machine::Result object.
machine_result
result
This method returns a reference to a list of trues or falses, depending on there were / weren't errors during the execution of a remote command in every machine.
allfirstok
This method returns true if all the values of the list returned by the method result are true. Moreover, this method is used to overload the operator bool.
str
This method returns the string made of concatenating stdout, stderr and errmsg of every machine. The resulting string of calling this method looks like:
host1: host2: file not found host3:
Furthermore, this method is used to overload the Perl operator q(""). Thus, wherever a GRID::Cluster::Result object is used on a scalar string context the method str will be called.
GRID::Cluster::Tutorial
GRID::Machine
IPC::PerlSSH
http://www.openssh.com
http://www.csm.ornl.gov/torc/C3/
Man pages of ssh, ssh-key-gen, ssh_config, scp, ssh-agent, ssh-add, sshd
ssh
ssh-key-gen
ssh_config
scp
ssh-agent
ssh-add
sshd
Eduardo Segredo Gonzalez <esegredo@ull.es> and Casiano Rodriguez Leon <casiano@ull.es>
This work has been supported by the EC (FEDER) and the Spanish Ministry of Science and Innovation inside the 'Plan Nacional de I+D+i' with the contract number TIN2008-06491-C04-02.
Also, it has been supported by the Canary Government project number PI2007/015.
The work of Eduardo Segredo was funded by grant FPU-AP2009-0457.
Copyright (C) 2010 by Casiano Rodriguez Leon and Eduardo Segredo Gonzalez. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.2 or, at your option, any later version of Perl 5 you may have available.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install GRID::Cluster, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GRID::Cluster
CPAN shell
perl -MCPAN -e shell install GRID::Cluster
For more information on module installation, please visit the detailed CPAN module installation guide.