Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: json creator for QueryStatusCount should match getter (MINOR) #5052

Merged
merged 1 commit into from Apr 11, 2020

Conversation

vcrfxia
Copy link
Contributor

@vcrfxia vcrfxia commented Apr 10, 2020

Description

The QueryStatusCount getter returns Map<KsqlQueryStatus, Integer> but the creator expects Map<KafkaStreams.State, Integer> which means deserialization fails for KsqlQueryStatus.UNRESPONSIVE since that's not a valid KafkaStreams.State:

Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: 
Cannot deserialize Map key of type `org.apache.kafka.streams.KafkaStreams$State` from String "UNRESPONSIVE": not a valid representation, problem: (com.fasterxml.jackson.databind.exc.InvalidFormatException) Cannot deserialize Map key of type `org.apache.kafka.streams.KafkaStreams$State` from String "UNRESPONSIVE": not one of the values accepted for Enum class: [CREATED, NOT_RUNNING, RUNNING, ERROR, REBALANCING, PENDING_SHUTDOWN]

This PR updates the creator to match the getter.

Testing done

Added unit test.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@vcrfxia vcrfxia requested a review from a team as a code owner April 10, 2020 23:39
@vcrfxia vcrfxia changed the title fix: json creator for QueryStatusCount should match getter fix: json creator for QueryStatusCount should match getter (MINOR) Apr 10, 2020
Copy link
Member

@stevenpyzhang stevenpyzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@vcrfxia vcrfxia merged commit 988c3d1 into confluentinc:master Apr 11, 2020
@vcrfxia vcrfxia deleted the query-status-count-creator branch April 11, 2020 05:14
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.

None yet

2 participants