druid/codestyle
Gian Merlino a2bad0b3a2
Reduce allocations due to Jackson serialization. (#12468)
* Reduce allocations due to Jackson serialization.

This patch attacks two sources of allocations during Jackson
serialization:

1) ObjectMapper.writeValue and JsonGenerator.writeObject create a new
   DefaultSerializerProvider instance for each call. It has lots of
   fields and creates pressure on the garbage collector. So, this patch
   adds helper functions in JacksonUtils that enable reuse of
   SerializerProvider objects and updates various call sites to make
   use of this.

2) GroupByQueryToolChest copies the ObjectMapper for every query to
   install a special module that supports backwards compatibility with
   map-based rows. This isn't needed if resultAsArray is set and
   all servers are running Druid 0.16.0 or later. This release was a
   while ago. So, this patch disables backwards compatibility by default,
   which eliminates the need to copy the heavyweight ObjectMapper. The
   patch also introduces a configuration option that allows admins to
   explicitly enable backwards compatibility.

* Add test.

* Update additional call sites and add to forbidden APIs.
2022-04-27 14:17:26 -07:00
..
LICENSE.txt Update license headers. (#5976) 2018-07-11 09:55:18 -07:00
checkstyle-suppressions.xml handle timestamps of complex types when parsing protobuf messages (#11293) 2021-06-07 15:19:39 +05:30
checkstyle.xml Add Checkstyle check for String literal equality (#8386) 2019-08-28 17:53:42 +03:00
druid-forbidden-apis.txt Reduce allocations due to Jackson serialization. (#12468) 2022-04-27 14:17:26 -07:00
guava16-forbidden-apis.txt Forbiddenapis: Split the guava16-only signatures file from main signatures file (#12170) 2022-01-19 17:50:28 -08:00
joda-time-forbidden-apis.txt Introduce SegmentId class (#6370) 2019-01-21 11:11:10 -08:00
pmd-ruleset.xml Remove use of deprecated PMD ruleset (#12044) 2021-12-09 13:04:27 -08:00
spotbugs-exclude.xml Add syntax support for PARTITIONED BY/CLUSTERED BY in INSERT queries (#12163) 2022-02-08 16:23:15 +05:30