Hi,
I have created below .avsc schema file and I tried creating corresponding
classes by using avro tool and with plugin, but there are few errors on
generated java code. What could be the issue?
{"namespace": "test.avro",
"type": "record",
"name": "Session",
"fields": [
{"name":"VisitCommon", "type": {
"type": "map", "values":"string"}},
{"name":"events",
"type": {
"type": "array",
"items":{
"name":"Event",
"type":"map",
"values":"string"}
}
}
]
}
1) Error: The method deepCopy(Schema, List<Map<CharSequence,CharSequence>>)
is undefined for the type GenericData
2) And also observed there is some deprecated code.
@Deprecated public
java.util.Map<java.lang.CharSequence,java.lang.CharSequence> VisitCommon;
I used eclipse plugin as mentioned below.
http://avro.apache.org/docs/1.7.6/mr.html
I tried with different versions of avro-maven-plugin, with 1.7.5, 1.7.6 and
with jdk1.7.0_45 version.
I am unable to resolve it.
Error message is as below:
[ERROR] symbol: method
deepCopy(org.apache.avro.Schema,java.util.Map<java.lang.CharSequence,java.lang.CharSequence>)
[ERROR] location: class org.apache.avro.generic.GenericData
Thanks & Regards,
B Anil Kumar.