[ 
https://issues.apache.org/jira/browse/SAMZA-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Boris Shkolnik updated SAMZA-1912:
----------------------------------
    Description: 
These are some code style improvements from PR #624:

1. KafkaSystemConsumer and KafkaConsumerProxy:

LOG.info("{}: Created KafkaConsumerProxy {} ", this, proxy);

Would prefer to log everything in this class as "Created KafkaConsumerProxy {} 
for systemName {}" for consistency with rest of the codebase.

 

2.

KafkaSystemConsumer:startSubscription
 Can this entire method be in KafkaConsumerProxy to consolidate consumer 
management in one class (as the name KafkaConsumerProxy implies).

 

3.
 KafkaSystemConsumer.java
 Same comment as other class: prefer ordering methods logically by how they're 
used. E.g., it makes more sense to order them as 'register, start, poll, stop' 
etc than the current order of 'start, stop, register, poll'. Also, prefer 
ordering methods by visibility: public, protected then private methods.

 

4. KafkaSystemAdmin

move getOffsetsAfter() to match interface definitions.

  was:
These are some code style improvements from PR #624:

1. KafkaSystemConsumer and KafkaConsumerProxy:

LOG.info("{}: Created KafkaConsumerProxy {} ", this, proxy);

Would prefer to log everything in this class as "Created KafkaConsumerProxy {} 
for systemName {}" for consistency with rest of the codebase.

 

2.

KafkaSystemConsumer:startSubscription
Can this entire method be in KafkaConsumerProxy to consolidate consumer 
management in one class (as the name KafkaConsumerProxy implies).

 

3.
KafkaSystemConsumer.java
Same comment as other class: prefer ordering methods logically by how they're 
used. E.g., it makes more sense to order them as 'register, start, poll, stop' 
etc than the current order of 'start, stop, register, poll'. Also, prefer 
ordering methods by visibility: public, protected then private methods.


> improve code style for KafkaSystemConsumer(Proxy) and KafkaAdminClient
> ----------------------------------------------------------------------
>
>                 Key: SAMZA-1912
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1912
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Boris Shkolnik
>            Assignee: Boris Shkolnik
>            Priority: Major
>
> These are some code style improvements from PR #624:
> 1. KafkaSystemConsumer and KafkaConsumerProxy:
> LOG.info("{}: Created KafkaConsumerProxy {} ", this, proxy);
> Would prefer to log everything in this class as "Created KafkaConsumerProxy 
> {} for systemName {}" for consistency with rest of the codebase.
>  
> 2.
> KafkaSystemConsumer:startSubscription
>  Can this entire method be in KafkaConsumerProxy to consolidate consumer 
> management in one class (as the name KafkaConsumerProxy implies).
>  
> 3.
>  KafkaSystemConsumer.java
>  Same comment as other class: prefer ordering methods logically by how 
> they're used. E.g., it makes more sense to order them as 'register, start, 
> poll, stop' etc than the current order of 'start, stop, register, poll'. 
> Also, prefer ordering methods by visibility: public, protected then private 
> methods.
>  
> 4. KafkaSystemAdmin
> move getOffsetsAfter() to match interface definitions.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to