Details
-
Type: Bug
-
Status: Open
-
Priority: Critical
-
Resolution: Unresolved
-
Affects Version/s: 0.8.1
-
Fix Version/s: maintenance-tasks
-
Component/s: HBase Module
-
Labels:
Description
Looks like the Avro schemas in the tests of the HBase module repeat some class names. This causes a schema parser primed with previous definitions to fail with duplicate types. In other words, this technically isn't legal, but works in with the Maven Avro codegen plugin because the class is simply overwritten. With more strict plugins (like the Gradle plugin), this fails.
Here's the relevant bit:
Caused by: org.gradle.api.GradleException: Failed to compile schema definition file /Users/esammer/Documents/Code/cdk/cdk-data/cdk-data-hbase/src/test/avro/TestRecord.avsc at com.commercehub.gradle.plugin.avro.GenerateAvroJavaTask.processSchemaFiles(GenerateAvroJavaTask.java:127) at com.commercehub.gradle.plugin.avro.GenerateAvroJavaTask.processFiles(GenerateAvroJavaTask.java:71) at com.commercehub.gradle.plugin.avro.GenerateAvroJavaTask.process(GenerateAvroJavaTask.java:57) at org.gradle.util.JavaMethod.invoke(JavaMethod.java:62) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:527) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:510) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) ... 49 more Caused by: org.apache.avro.SchemaParseException: Can't redefine: com.cloudera.cdk.data.hbase.avro.entities.TestEnum at org.apache.avro.Schema$Names.put(Schema.java:1042) at org.apache.avro.Schema$Names.add(Schema.java:1037) at org.apache.avro.Schema.parse(Schema.java:1148) at org.apache.avro.Schema.parse(Schema.java:1116) at org.apache.avro.Schema$Parser.parse(Schema.java:950) at org.apache.avro.Schema$Parser.parse(Schema.java:919) at com.commercehub.gradle.plugin.avro.GenerateAvroJavaTask.processSchemaFiles(GenerateAvroJavaTask.java:115)