Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1531

Assignment missing in AvroDatumConverterFactory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.7.5, 1.7.6
    • None
    • java
    • None

    Description

      The following defect found in method: public <IN, OUT> AvroDatumConverter<IN, OUT> create(Class<IN> inputClass):

      if (AvroValue.class.isAssignableFrom(inputClass)) {
      Schema schema = null;
      if (isMapOnly) {
      AvroJob.getMapOutputValueSchema(getConf());<--!!!Missing assignment to schema variable-->
      if (null == schema)

      { schema = AvroJob.getOutputValueSchema(getConf()); }

      }
      else

      { schema = AvroJob.getOutputValueSchema(getConf()); }

      if (null == schema)

      { throw new IllegalStateException( "Writer schema for output value was not set. Use AvroJob.setOutputValueSchema()."); }

      return (AvroDatumConverter<IN, OUT>) new AvroWrapperConverter(schema);
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            youarehow Jian Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: