Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## main #30 +/- ##
============================================
+ Coverage 66.10% 66.54% +0.44%
- Complexity 107 115 +8
============================================
Files 12 13 +1
Lines 531 559 +28
Branches 91 91
============================================
+ Hits 351 372 +21
- Misses 159 166 +7
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
| SpecificRecordBuilderBase builderModel = | ||
| (SpecificRecordBuilderBase) declaredConstructor.newInstance(); | ||
|
|
||
| return Pair.of(newBuilderMethod, builderModel); |
There was a problem hiding this comment.
Do we have to pass the instance declaredConstructor.newInstance()? Is this class instance, right? So, it will be used by the builder of creating an object, right?
There was a problem hiding this comment.
We are creating a default builder instance once per avro class and using it as blue print to create other builder instances to reduce the reflection overhead.
Description
Utility class to instantiate a new avro builder in a fast and efficient way. Default Avro implementation has a perf issue due to uncached reflection based implementation. For more details, https://issues.apache.org/jira/browse/AVRO-3048
This avro perf bug is fixed in unreleased avro version (0.11.x). We can get rid of this utility class once we migrate to Avro 0.11.x or above.
Testing
Unit tests added
Checklist:
Documentation
NA