AnsweredAssumed Answered

Job failed

Question asked by kim on Nov 17, 2011
Latest reply on Jan 15, 2012 by Ted Dunning
I have a test programming which submits a job to MapR but the job failed.
<pre>
Error initializing attempt_201111141410_0011_m_000000_0:
java.io.IOException: Job initialization failed (255)org.apache.hadoop.util.Shell$ExitCodeException: . Output of LinuxTaskController initializeJob: Reading task controller config from /opt/mapr/hadoop/hadoop-0.20.2/conf/taskcontroller.cfg
User foo not found
at org.apache.hadoop.mapred.LinuxTaskController.initializeJob(LinuxTaskController.java:195)
at org.apache.hadoop.mapred.TaskTracker$4.run(TaskTracker.java:1549)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1074)
at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1524)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1417)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:3575)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:3498)
</pre>

I am not sure what "User foo not found" mean. Is there any additional configurations I need to set?
Here is my code,
<code>
public void testJobSubmission() throws Throwable {
        File file = TestUtils.newTemporaryFile();
        try {
            SleepJob job = new SleepJob(file);
            JobSubmission submission = job.toJobSubmission();
            submission.setHadoopVersion(HadoopVersion.VERSION_MAPR);
            submission.setJobTrackerAddress(new InetSocketAddress(MapRClusterConstants.HOSTNAME, 9001));
            submission.setUsername("foo");
            submission.setGroupname("dialout");
            JobSubmitter submitter = submission.newJobSubmitter();
            JobID id = submitter.submit();
            LOG.info("Job ID is " + id);
            int retry = 0;
            for (;;) {
                if (retry > 10)
                    throw new Exception("Too many retries; failed.");
                Thread.sleep(1000);
                JobAdapter ja = submitter.monitor(id);
                if (ja == null) {
                    retry++;
                    LOG.info("Job state not available; retry = " + retry);
                    continue;
                }
                LOG.info(ja.getSummary());
                if (ja.getJobState().isCompleted()) {
                    assertEquals(JobRunState.SUCCEEDED, ja.getJobState());
                    break;
                }
            }
        } catch (Throwable t) {
            TestUtils.panic(t);
        } finally {
            FileUtils.deleteQuietly(file);
        }
    }
</code>
Thanks.

Outcomes