Skip to content

Define custom json serializer for DataSize and Duration#16087

Merged
tdcmeehan merged 1 commit intoprestodb:masterfrom
abhiseksaikia:asaikia_disagg_coordinator
May 13, 2021
Merged

Define custom json serializer for DataSize and Duration#16087
tdcmeehan merged 1 commit intoprestodb:masterfrom
abhiseksaikia:asaikia_disagg_coordinator

Conversation

@abhiseksaikia
Copy link
Contributor

Currently thrift encoding leverages ThriftCodec implementations that convert DataSize as well as Duration objects to double for optimization. So even though the resource manager thrift client sends both DataSize as well as Duration objects with well formatted unit, the unit information is getting lost on Resource manager server side. This commit is to address this issue by defining custom json serializer so that UI can display well formatted json value for DataSize and Duration.

Test plan - Verified by running TpchQueryRunner

Currently thrift encoding leverages ThriftCodec implementations that convert datasize as well as duration to double for optimization. So even though resource manager thrift client sends both duration as well as data size with well formatted unit, the unit information is getting lost on Resource manager server. This commit is to address this issue by defining custom json serializer so that UI can display well formatted json value for DataSize and Duration.
@abhiseksaikia abhiseksaikia marked this pull request as draft May 12, 2021 23:45
@abhiseksaikia abhiseksaikia marked this pull request as ready for review May 13, 2021 00:47
@tdcmeehan tdcmeehan merged commit 486f4e2 into prestodb:master May 13, 2021
@sujay-jain sujay-jain mentioned this pull request May 21, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants