sbt-avrohugger | sbt plugin for generating Scala sources | Build Tool library
kandi X-RAY | sbt-avrohugger Summary
kandi X-RAY | sbt-avrohugger Summary
sbt plugin for generating Scala sources for Apache Avro schemas and protocols.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sbt-avrohugger
sbt-avrohugger Key Features
sbt-avrohugger Examples and Code Snippets
Community Discussions
Trending Discussions on sbt-avrohugger
QUESTION
I'm creating a new project in sbt, and I'm having a hard time getting avro files to generate. I'm using avrohugger in my sbt plugins:
...ANSWER
Answered 2017-Dec-11 at 21:41After some digging, this was a few different issues.
First was that (avroSpecificSourceDirectory in Compile) := new java.io.File("src/main/resources/avro")
is not the full namespace, and that actually made a difference. I was using my.cool.namespace
because my folder was incorrect and also had the .
's in it. Remaking the folder structure to match the expected namespace, and changing this to slashes, helped it find the files it needed.
I was able to remove the namespace mapping, since my avro definitions didn't need it, and I didn't need the output folder because the default is fine.
Finally, I fixed which generator was being used in the compile step, and used the specific record generator throughout the build file.
So now, the relevant and completed build.sbt
part looks like this:
QUESTION
I am working on a flat schema, there is no nested type inside, and it has more than 254 fields.
Goal: What I want to do is to automatically convert this kind of schema to a flat case class by the specific generator
Issue: a parameter list's length cannot exceed 254 in JVM
What I tried => use the plugins sbt-avrohugger and sbt-avro4s, but they didn't work so well.
Q: Is there a way to achieve the goal?
...ANSWER
Answered 2017-Nov-26 at 03:30this is fix in avro 1.8.1
https://issues.apache.org/jira/browse/AVRO-1642
if is possible use avro 1.8.1 or higher, it will solve your issue
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sbt-avrohugger
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page