[
https://issues.apache.org/jira/browse/KAFKA-3620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ashish K Singh updated KAFKA-3620:
----------------------------------
Description:
This came up on PR of KAFKA-3307. Below is excerpt.
{quote}
With the versioning getting a little more complex in Protocol class, it makes
sense to try and encapsulate some of its logic a little better. For example,
rather than using raw arrays for each request type, we could have something
like this:
{code}
class KafkaApi {
private ApiKey api;
private Schema[] requests;
private Schema[] responses;
Schema currentSchema();
Schema schemaFor(int version);
int minVersion();
int currentVersion();
}
{code}
{quote}
was:
This came up on PR of KAFKA-3307. Below is excerpt.
{quote}
With the versioning getting a little more complex in Protocol class, it makes
sense to try and encapsulate some of its logic a little better. For example,
rather than using raw arrays for each request type, we could have something
like this:
class KafkaApi {
private ApiKey api;
private Schema[] requests;
private Schema[] responses;
Schema currentSchema();
Schema schemaFor(int version);
int minVersion();
int currentVersion();
}
{quote}
> Clean up Protocol class.
> ------------------------
>
> Key: KAFKA-3620
> URL: https://issues.apache.org/jira/browse/KAFKA-3620
> Project: Kafka
> Issue Type: Improvement
> Reporter: Ashish K Singh
> Assignee: Ashish K Singh
>
> This came up on PR of KAFKA-3307. Below is excerpt.
> {quote}
> With the versioning getting a little more complex in Protocol class, it makes
> sense to try and encapsulate some of its logic a little better. For example,
> rather than using raw arrays for each request type, we could have something
> like this:
> {code}
> class KafkaApi {
> private ApiKey api;
> private Schema[] requests;
> private Schema[] responses;
> Schema currentSchema();
> Schema schemaFor(int version);
> int minVersion();
> int currentVersion();
> }
> {code}
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)