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

MultipleOutputs output lost if baseOutputPath starts with ../

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 0.20.2
    • None
    • client
    • None

    Description

      Lets say you have output directory set:

      FileOutputFormat.setOutputPath(job, "/tmp/multi1/out");

      and want to place output from MultipleOutputs into /tmp/multi1/extra

      I expect following code to work:

      mos = new MultipleOutputs<Text, IntWritable>(context);
      mos.write(new Text("zrr"), value, "../extra/");

      but no Exception is throw and expected output directory /tmp/multi1/extra does not even exists. All data written to this output vanish without trace.

      To make it work fullpath must be used
      mos.write(new Text("zrr"), value, "/tmp/multi1/extra/");

      Output is listed in statistics from MultipleOutputs correctly:

      org.apache.hadoop.mapreduce.lib.output.MultipleOutputs
      ../gaja1/=13333 (* everything is lost *)
      /tmp/multi1/out/../ksd34/=13333 (* this using full path works *)
      list1=6667

      Attachments

        1. MAPREDUCE-3772.patch
          2 kB
          Harsh J

        Activity

          People

            qwertymaniac Harsh J
            hsn Radim Kolar
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: