Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-6320

Configuration of retrieved Job via Cluster is not properly set-up

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • Important

    Description

      When getting a Job via the Cluster API, it is not correctly configured.

      To reproduce this:

      1. Submit a MR job, and set some arbitrary parameter to its configuration
        job.getConfiguration().set("foo", "bar");
        job.setJobName("foo-bug-demo");
        
      2. Get the job in a client:
        final Cluster c = new Cluster(conf);
        final JobStatus[] statuses = c.getAllJobStatuses();
        final JobStatus s = ... // get the status for the job named foo-bug-demo
        final Job j = c.getJob(s.getJobId());
        final Configuration conf = job.getConfiguration();
        
      3. Get its "foo" entry
        final String s = conf.get("foo");
        
      4. Expected: s is "bar"; But: s is null.

      The reason is that the job's configuration is stored on HDFS (the Configuration has a resource with a hdfs:// URL) and in the loadResource it is changed to a path on the local file system (hdfs://host.domain:port/tmp/hadoop-yarn/... is changed to /tmp/hadoop-yarn/...), which does not exist, and thus the configuration is not populated.

      The bug happens in the Cluster class, where JobConfs are created from status.getJobFile(). A quick fix would be to copy this job file to a temporary file in the local file system and populate the JobConf from this file.

      Attachments

        1. MAPREDUCE-6320.003.patch
          15 kB
          Jens Rabe
        2. MAPREDUCE-6320.002.patch
          14 kB
          Jens Rabe
        3. MAPREDUCE-6320.001.patch
          9 kB
          Jens Rabe

        Activity

          People

            rabe-jens Jens Rabe
            rabe-jens Jens Rabe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: