We are trying to set up a single node cloudera hadoop cluster having 16 GB as RAM on linux machine. We are setting up 5.4.2 version.
Now when we check statistics post the installation and run the top command we find that only 1 -2 GB is available. when we trigger map reduce sample job - no... (2 Replies)
Team,
I would like to know, if we have any command in Solaris to verify, if some process is listening on a port on a set of machines.
for eg: Wrote the below script, and found that when a process is listening on that port, then it just waits there and doesnt come out. Rather, I would like... (6 Replies)
Here is an excellent article on Running MySQL on Amazon EC2 with Elastic Block Store.
Amazon Web Services Developer Connection : Running MySQL on Amazon EC2 with Elastic Block Store (0 Replies)
GEARMANCLIENT.DOBACKGROUND(3) 1 GEARMANCLIENT.DOBACKGROUND(3)GearmanClient::doBackground - Run a task in the background
SYNOPSIS
public string GearmanClient::doBackground (string $function_name, string $workload, [string $unique])
DESCRIPTION
Runs a task in the background, returning a job handle which can be used to get the status of the running task.
PARAMETERS
o $function_name
- A registered function the worker is to execute
o $workload
- Serialized data to be processed
o $unique
- A unique ID used to identify a particular task
RETURN VALUES
The job handle for the submitted task.
EXAMPLES
Example #1
Submit and monitor a background job
The worker in this example has an artificial delay introduced to mimic a long running job. The client script periodically checks
the status of the running job.
<?php
/* create our object */
$gmclient= new GearmanClient();
/* add the default server */
$gmclient->addServer();
/* run reverse client */
$job_handle = $gmclient->doBackground("reverse", "this is a test");
if ($gmclient->returnCode() != GEARMAN_SUCCESS)
{
echo "bad return code
";
exit;
}
$done = false;
do
{
sleep(3);
$stat = $gmclient->jobStatus($job_handle);
if (!$stat[0]) // the job is known so it is not done
$done = true;
echo "Running: " . ($stat[1] ? "true" : "false") . ", numerator: " . $stat[2] . ", denomintor: " . $stat[3] . "
";
}
while(!$done);
echo "done!
";
?>
The above example will output something similar to:
Running: true, numerator: 3, denomintor: 14
Running: true, numerator: 6, denomintor: 14
Running: true, numerator: 9, denomintor: 14
Running: true, numerator: 12, denomintor: 14
Running: false, numerator: 0, denomintor: 0
done!
SEE ALSO
GearmanClient::doNormal, GearmanClient::doHigh, GearmanClient::doLow, GearmanClient::doHighBackground, GearmanClient::doLowBackground.
PHP Documentation Group GEARMANCLIENT.DOBACKGROUND(3)