[ https://issues.apache.org/jira/browse/AVRO-3154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17426146#comment-17426146 ]
Rasmus Helbig Hansen commented on AVRO-3154: -------------------------------------------- No problem, [~rskraba]. I ended up writing a bunch of JMH-based benchmarks for various encoding and decoding configurations, when I was looking at the custom coders feature. Coincidentally, I know that Confluent makes use of JMH as well, here: [https://github.com/confluentinc/schema-registry/tree/master/benchmark|https://github.com/confluentinc/schema-registry/tree/master/benchmark,]. It's Java specific, but I don't think that such micro benchmarks can be anything but specific to the programming language. > Missing customEncode method for Java class generated from schema with logical > type timestamp-millis > --------------------------------------------------------------------------------------------------- > > Key: AVRO-3154 > URL: https://issues.apache.org/jira/browse/AVRO-3154 > Project: Apache Avro > Issue Type: Bug > Components: java > Affects Versions: 1.10.2 > Environment: Java version: > OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9) > OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, > sharing) > MacOs default console > Reporter: Jakub Hałun > Priority: Major > Attachments: TableChangeAvro.java > > > I'm trying to compile avro schema to java class with the command: > {{java -jar avro-tools-1.10.2.jar compile schema }} > Prepared schema is as follows: > ^{^ > ^"type": "record",^ > ^"name": "TableChangeAvro",^ > ^"fields": [^ > ^{^ > ^"name": "ownerProjectId",^ > ^"type": "string"^ > ^},^ > ^{^ > ^"name": "dataset",^ > ^"type": "string"^ > ^},^ > ^{^ > ^"name": "table",^ > ^"type": "string"^ > ^},^ > ^{^ > ^"name": "timestamp",^ > ^"type" : {^ > ^"type" : "long",^ > ^"logicalType" : "timestamp-millis"^ > ^}^ > ^}^ > ^]^ > ^}^ > The schema compiles successfully to Java class (attached), but the class has > missing methods: > public void customEncode(Encoder out) throws IOException > public void customDecode(ResolvingDecoder in) throws IOException > > Because of that, I'm unable to use it for Google Pub/Sub publication as > intended. The problem occurs for the schema only when the type with > timestamp-millis logical type is included. > -- This message was sent by Atlassian Jira (v8.3.4#803005)