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

Joel Koshy updated KAFKA-501:
-----------------------------

    Attachment: KAFKA-501-v1.patch

Overview of changes:
1 - For non-followers, collapse any offsets > hw into a single entry == hw.
2 - I think the returned offsets are reverse sorted, but I did that again
  anyway, for the above collapsing to work correctly. I could just as well
  use Seq.span.
3 - Made the offsetrequest batched, using a map. So this is very similar to
  what was done for KAFKA-391. So I also needed to provide javaapi versions
  of the OffsetRequest and OffsetResponse.
4 - One side-effect of batching was I was forced to clean up the layering
  issue. i.e., I prevent log from taking offsetrequest.
5 - Switched from Array to Seq in the scala version (and got rid of the
  equals).
6 - For consistency, made simple-consumer's getOffsetsBefore take a request
  and return a response.

Other points:
7 - I'm not very sure we should be providing the OffsetRequest directly to
  clients - i.e., maybe we should only have a request builder (like we have
  for FetchRequest). This would make it easier to use from the Java side and
  also we can hide the replicaId option - maybe it shouldn't be exposed to
  clients (especially on the Java-side)
8 - Code in getOffsetsBefore can be cleaned up quite a bit I think, but I left
  it as is for now.
9 - I was thinking of nesting PartitionOffsetRequestInfo inside the
  OffsetRequest object - that would make the code clearer, but only if users
  always fully qualify the reference.
10 - Previously getOffsetsBefore could through an exception on Error. Now, the
  client will need to explicitly check the errorCode. We may need to go
  through all usages and assess whether we want to throw an exception or
  not.

                
> getOfffset Api needs to return different latest offset to regular and 
> follower consumers
> ----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-501
>                 URL: https://issues.apache.org/jira/browse/KAFKA-501
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jun Rao
>            Assignee: Joel Koshy
>            Priority: Blocker
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: KAFKA-501-v1.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> For follower consumers, getOffset should return logEndOffset as the latest 
> offset. For regular consumers, getOffset should return highWatermark as the 
> latest offset. 

--
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