[jira] [Commented] (KAFKA-10269) AdminClient ListOffsetsResultInfo/timestamp is always -1

2021-06-11 Thread Dongjin Lee (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-10269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17361464#comment-17361464
 ] 

Dongjin Lee commented on KAFKA-10269:
-

[~d-t-w]

> is it difficult or expensive to return the timestamp in the case of Earliest 
> or Latest Spec?

I can't be certain. AFAIK this is for a historical reason or backward 
compatibility.

> In terms of API, is there any other way to identify the timestamp of the 
> first or last offset?

Seek to the first or last position with Consumer. 2. Fetch a record, check the 
timestamp.

> AdminClient ListOffsetsResultInfo/timestamp is always -1
> 
>
> Key: KAFKA-10269
> URL: https://issues.apache.org/jira/browse/KAFKA-10269
> Project: Kafka
>  Issue Type: Bug
>  Components: admin
>Affects Versions: 2.5.0
>Reporter: Derek Troy-West
>Priority: Minor
>
> When using AdminClient/listOffsets the resulting ListOffsetResultInfos appear 
> to always have a timestamp of -1.
> I've run listOffsets against live clusters with multiple Kafka versions (from 
> 1.0 to 2.5) with both CreateTIme and LogAppendTime for 
> message.timestamp.type, every result has -1 timestamp.
> e.g. 
> {{org.apache.kafka.clients.admin.ListOffsetsResult$ListOffsetsResultInfo#}}{{0x5c3a771}}
> ListOffsetsResultInfo(} offset=23016, timestamp=-1, 
> {{leaderEpoch=Optional[0])}}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-10269) AdminClient ListOffsetsResultInfo/timestamp is always -1

2021-06-11 Thread Derek Troy-West (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-10269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17361436#comment-17361436
 ] 

Derek Troy-West commented on KAFKA-10269:
-

Thanks [~dongjin] for the information.

One question - is it difficult or expensive to return the timestamp in the case 
of Earliest or Latest Spec?

In terms of API, is there any other way to identify the timestamp of the first 
or last offset?

> AdminClient ListOffsetsResultInfo/timestamp is always -1
> 
>
> Key: KAFKA-10269
> URL: https://issues.apache.org/jira/browse/KAFKA-10269
> Project: Kafka
>  Issue Type: Bug
>  Components: admin
>Affects Versions: 2.5.0
>Reporter: Derek Troy-West
>Priority: Minor
>
> When using AdminClient/listOffsets the resulting ListOffsetResultInfos appear 
> to always have a timestamp of -1.
> I've run listOffsets against live clusters with multiple Kafka versions (from 
> 1.0 to 2.5) with both CreateTIme and LogAppendTime for 
> message.timestamp.type, every result has -1 timestamp.
> e.g. 
> {{org.apache.kafka.clients.admin.ListOffsetsResult$ListOffsetsResultInfo#}}{{0x5c3a771}}
> ListOffsetsResultInfo(} offset=23016, timestamp=-1, 
> {{leaderEpoch=Optional[0])}}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-10269) AdminClient ListOffsetsResultInfo/timestamp is always -1

2021-06-05 Thread Dongjin Lee (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-10269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17357938#comment-17357938
 ] 

Dongjin Lee commented on KAFKA-10269:
-

[~huxi_2b] It seems like this is not a bug. Reviewing the code, I found the 
following:

1. AdminClient#listOffsets can take OffsetSpec parameter per TopicPartition, 
which can be one of EarliestSpec, LatestSpec, TimestampSpec.
2. For EarliestSpec and LatestSpec, a timestamp is not returned. see: 
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/log/Log.scala#L1310
 Instead, -1 is returned.
3. For TimestampSpec, the designated timestamp is returned: 
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/cluster/Partition.scala#L1152

I think this issue is rather a lack of documentation.

> AdminClient ListOffsetsResultInfo/timestamp is always -1
> 
>
> Key: KAFKA-10269
> URL: https://issues.apache.org/jira/browse/KAFKA-10269
> Project: Kafka
>  Issue Type: Bug
>  Components: admin
>Affects Versions: 2.5.0
>Reporter: Derek Troy-West
>Priority: Minor
>
> When using AdminClient/listOffsets the resulting ListOffsetResultInfos appear 
> to always have a timestamp of -1.
> I've run listOffsets against live clusters with multiple Kafka versions (from 
> 1.0 to 2.5) with both CreateTIme and LogAppendTime for 
> message.timestamp.type, every result has -1 timestamp.
> e.g. 
> {{org.apache.kafka.clients.admin.ListOffsetsResult$ListOffsetsResultInfo#}}{{0x5c3a771}}
> ListOffsetsResultInfo(} offset=23016, timestamp=-1, 
> {{leaderEpoch=Optional[0])}}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-10269) AdminClient ListOffsetsResultInfo/timestamp is always -1

2020-07-21 Thread huxihx (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-10269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17162444#comment-17162444
 ] 

huxihx commented on KAFKA-10269:


[~d-t-w] Thanks for reporting and feel free to take this ticket.

> AdminClient ListOffsetsResultInfo/timestamp is always -1
> 
>
> Key: KAFKA-10269
> URL: https://issues.apache.org/jira/browse/KAFKA-10269
> Project: Kafka
>  Issue Type: Bug
>  Components: admin
>Affects Versions: 2.5.0
>Reporter: Derek Troy-West
>Priority: Minor
>
> When using AdminClient/listOffsets the resulting ListOffsetResultInfos appear 
> to always have a timestamp of -1.
> I've run listOffsets against live clusters with multiple Kafka versions (from 
> 1.0 to 2.5) with both CreateTIme and LogAppendTime for 
> message.timestamp.type, every result has -1 timestamp.
> e.g. 
> {{org.apache.kafka.clients.admin.ListOffsetsResult$ListOffsetsResultInfo#}}{{0x5c3a771}}
> ListOffsetsResultInfo(} offset=23016, timestamp=-1, 
> {{leaderEpoch=Optional[0])}}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-10269) AdminClient ListOffsetsResultInfo/timestamp is always -1

2020-07-13 Thread Derek Troy-West (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-10269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17157020#comment-17157020
 ] 

Derek Troy-West commented on KAFKA-10269:
-

Can I add, if this is a bug I'm happy to diagnose and contribute a patch/fix. 
Just wondering if anyone else is experiencing the same before continuing 
further.

> AdminClient ListOffsetsResultInfo/timestamp is always -1
> 
>
> Key: KAFKA-10269
> URL: https://issues.apache.org/jira/browse/KAFKA-10269
> Project: Kafka
>  Issue Type: Bug
>  Components: admin
>Affects Versions: 2.5.0
>Reporter: Derek Troy-West
>Priority: Minor
>
> When using AdminClient/listOffsets the resulting ListOffsetResultInfos appear 
> to always have a timestamp of -1.
> I've run listOffsets against live clusters with multiple Kafka versions (from 
> 1.0 to 2.5) with both CreateTIme and LogAppendTime for 
> message.timestamp.type, every result has -1 timestamp.
> e.g. 
> {{org.apache.kafka.clients.admin.ListOffsetsResult$ListOffsetsResultInfo#}}{{0x5c3a771}}
> ListOffsetsResultInfo(} offset=23016, timestamp=-1, 
> {{leaderEpoch=Optional[0])}}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)