> On Feb. 13, 2015, 6:24 p.m., Eric Olander wrote:
> > core/src/main/scala/kafka/server/KafkaApis.scala, line 303
> > <https://reviews.apache.org/r/29912/diff/3/?file=862697#file862697line303>
> >
> > This code could be done using map and getOrElse on the Option rather
> > than using pattern matching/reflection.
> >
> > logManager.getLog(topicAndPartition).map{log => fetchOffsetsBefore(log,
> > timestamp, maxNumOffsets)
> > }.getOrElse {
> > if (timestamp == OffsetRequest.LatestTime || timestamp ==
> > OffsetRequest.EarliestTime)
> > Seq(0L)
> > else
> > Nil
> > }
Eric,
Thanks for the review. But the above code is not added as part of this
patch and also not releated to this JIRA so don't want to change it as part of
this patch.
- Sriharsha
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29912/#review72405
-----------------------------------------------------------
On Feb. 13, 2015, 12:46 a.m., Sriharsha Chintalapani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29912/
> -----------------------------------------------------------
>
> (Updated Feb. 13, 2015, 12:46 a.m.)
>
>
> Review request for kafka.
>
>
> Bugs: KAFKA-1852
> https://issues.apache.org/jira/browse/KAFKA-1852
>
>
> Repository: kafka
>
>
> Description
> -------
>
> KAFKA-1852. OffsetCommitRequest can commit offset on unknown topic. Added
> contains method to MetadataCache.
>
>
> Diffs
> -----
>
> core/src/main/scala/kafka/server/KafkaApis.scala
> 6ee7d8819a9ef923f3a65c865a0a3d8ded8845f0
> core/src/main/scala/kafka/server/MetadataCache.scala
> 4c70aa7e0157b85de5e24736ebf487239c4571d0
> core/src/main/scala/kafka/server/OffsetManager.scala
> 83d52643028c5628057dc0aa29819becfda61fdb
> core/src/test/scala/unit/kafka/server/OffsetCommitTest.scala
> 5b93239cdc26b5be7696f4e7863adb9fbe5f0ed5
>
> Diff: https://reviews.apache.org/r/29912/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Sriharsha Chintalapani
>
>