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

Yang Ye updated KAFKA-432:
--------------------------

    Attachment: kafka_432_v1.diff


1. removing the "ConsumerShell.scala" file

2. Use "replicaId" field in "FetchRequest" and "OffsetRequest" to indicate 
where the fetch is from, -1 means "OrdinaryConsumerId", -2 means 
"LowLevelConsumerId", instead of using "clientId" to distinguish different 
request 

3. create a function "getLocalReplica()" in ReplicaManager, which returns the 
local replica even if it's not the leader. This function is used in KafkaApis, 
to work with requests from "LowLevelConsumerId"

4. In kafkaApis, when handling "offsetRequest" and "fetchRequest", treat 
differently depending on the value of the "replicaId" field. If it's from 
"lowLevelConsumer", use "getLocalReplica" instead of "getLocalReplicaIfLeader"

5. Move the "earliestOrLatestOffset()" function from 
"zookeeperConsumerConnector" to "SimpleConsumer" because it's now used by both 
the high level and low level consumer. (And create two overloaded functions 
because the client can get it from either zkConnect or from brokerList)

6. Move the "MessageFormmater" inner class out of "ConsoleConsumer", because 
it's now used by both the console consumer and the simple consumer shell

7. Update the logic of simpleConsumerShell so that it supports fetching from 
any specified replica now. 

8. Removing some unused import and fixed missing arguments in some log statement
                
> allow consumer to read from followers
> -------------------------------------
>
>                 Key: KAFKA-432
>                 URL: https://issues.apache.org/jira/browse/KAFKA-432
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Assignee: Yang Ye
>            Priority: Blocker
>              Labels: optimization
>         Attachments: kafka_432_v1.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> For debugging purpose, it would be convenient if we allow a consumer to 
> consume from a follower replica.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to