Uploaded image for project: 'HCatalog'
  1. HCatalog
  2. HCATALOG-494

MultiOutputFormat in 0.23 fails to setAliasConf() correctly.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.4.1
    • 0.4.1
    • mapreduce
    • None
    • Hadoop-0.23.1

    Description

      When using MultiOutputFormat (in Sta^H^H^H a super-duper top secret project that shall not be named), against Hadoop 0.23.1, one sees the following:

      <exception>
      java.lang.StringIndexOutOfBoundsException: String index out of range: -2
      at java.lang.AbstractStringBuilder.delete(AbstractStringBuilder.java:698)
      at java.lang.StringBuilder.delete(StringBuilder.java:255)
      at org.apache.hcatalog.mapreduce.MultiOutputFormat.setAliasConf(MultiOutputFormat.java:291)
      at org.apache.hcatalog.mapreduce.MultiOutputFormat.checkOutputSpecs(MultiOutputFormat.java:224)
      at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:411)
      at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:326)
      at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1215)
      at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1212)
      ...
      </exception>

      The error boils down to a change in the semantics of JobContext::JobContext(Configuration, JobID). While in .20, the Config was cloned, in .23 the Config is adopted (iff it's a JobConf). This causes the same Configuration instance to be written-to for different tables in the same job.

      An easy way to deal with this is to clone the Configuration before creating a JobContextImpl.

      A patch is on its way.

      Attachments

        1. HCatalog-494.trunk.patch
          4 kB
          Mithun Radhakrishnan
        2. HCatalog-494.patch
          5 kB
          Mithun Radhakrishnan

        Activity

          People

            mithun Mithun Radhakrishnan
            mithun Mithun Radhakrishnan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: