hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wxlfight (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAPREDUCE-5779) Hadoop1.0.2 : JobControl.run() Never stop
Date Wed, 05 Mar 2014 09:20:42 GMT
wxlfight created MAPREDUCE-5779:
-----------------------------------

             Summary: Hadoop1.0.2 : JobControl.run() Never stop
                 Key: MAPREDUCE-5779
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5779
             Project: Hadoop Map/Reduce
          Issue Type: Bug
            Reporter: wxlfight


My hadoop version:1.0.2

I wonder why when I call run() on a JobControl object, it loops forever .
Namely, this code doesn't work:

JobControl jobControl = new JobControl("Name");
// some stuff here (add jobs and dependencies)
jobControl.run();

This code works but looks a bit ugly:

JobControl jobControl = new JobControl("Name");
// some stuff here (add jobs and dependencies)
Thread control = new Thread(jobControl);
control.start();
while (!jobControl.allFinished()) {
    try {
        Thread.sleep(5000);
    }
    catch (Exception e) {}
}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message