[
https://issues.apache.org/jira/browse/AVRO-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14063015#comment-14063015
]
Jian Jiang commented on AVRO-1531:
----------------------------------
As indicated above the statement after if (isMapOnly) should be changed from :
AvroJob.getMapOutputValueSchema(getConf());
to:
schema = AvroJob.getMapOutputValueSchema(getConf());
> Assignment missing in AvroDatumConverterFactory
> -----------------------------------------------
>
> Key: AVRO-1531
> URL: https://issues.apache.org/jira/browse/AVRO-1531
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.7.5, 1.7.6
> Reporter: Jian Jiang
>
> 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);
> }
--
This message was sent by Atlassian JIRA
(v6.2#6252)