You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jay Kreps (JIRA)" <ji...@apache.org> on 2012/10/11 17:53:02 UTC

[jira] [Created] (KAFKA-566) Add last modified time to the TopicMetadataRequest

Jay Kreps created KAFKA-566:
-------------------------------

             Summary: Add last modified time to the TopicMetadataRequest
                 Key: KAFKA-566
                 URL: https://issues.apache.org/jira/browse/KAFKA-566
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 0.8
            Reporter: Jay Kreps
            Priority: Blocker
             Fix For: 0.8


To support KAFKA-560 it would be nice to have a last modified time in the TopicMetadataRequest. This would be the timestamp of the last append to the log as taken from stat on the final log segment.

Implementation would involve
1. Adding a new field to TopicMetadataRequest
2. Adding a method Log.lastModified: Long to get the last modified time from a log

This timestamp would, of course, be subject to error in the event that the file was touched without modification, but I think that is actually okay since it provides a manual way to avoid gc'ing a topic that you  know you will want.

It is debatable whether this should go in 0.8. It would be nice to add the field to the metadata request, at least, as that change should be easy and would avoid needing to bump the version in the future.

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

[jira] [Commented] (KAFKA-566) Add last modified time to the TopicMetadataRequest

Posted by "Neha Narkhede (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478336#comment-13478336 ] 

Neha Narkhede commented on KAFKA-566:
-------------------------------------

TopicMetadataRequest is the right class to look at. 
                
> Add last modified time to the TopicMetadataRequest
> --------------------------------------------------
>
>                 Key: KAFKA-566
>                 URL: https://issues.apache.org/jira/browse/KAFKA-566
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Jay Kreps
>            Priority: Blocker
>             Fix For: 0.8
>
>
> To support KAFKA-560 it would be nice to have a last modified time in the TopicMetadataRequest. This would be the timestamp of the last append to the log as taken from stat on the final log segment.
> Implementation would involve
> 1. Adding a new field to TopicMetadataRequest
> 2. Adding a method Log.lastModified: Long to get the last modified time from a log
> This timestamp would, of course, be subject to error in the event that the file was touched without modification, but I think that is actually okay since it provides a manual way to avoid gc'ing a topic that you  know you will want.
> It is debatable whether this should go in 0.8. It would be nice to add the field to the metadata request, at least, as that change should be easy and would avoid needing to bump the version in the future.

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

[jira] [Commented] (KAFKA-566) Add last modified time to the TopicMetadataRequest

Posted by "Madhusudan C.S. (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478330#comment-13478330 ] 

Madhusudan C.S. commented on KAFKA-566:
---------------------------------------

Makes sense, I will see if I can implement them. Btw, do we already have getMetadataRequest call implemented? I looked it up and I could not find it. Or does TopicMetadataRequest translates to getMetadataRequest for clients?
                
> Add last modified time to the TopicMetadataRequest
> --------------------------------------------------
>
>                 Key: KAFKA-566
>                 URL: https://issues.apache.org/jira/browse/KAFKA-566
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Jay Kreps
>            Priority: Blocker
>             Fix For: 0.8
>
>
> To support KAFKA-560 it would be nice to have a last modified time in the TopicMetadataRequest. This would be the timestamp of the last append to the log as taken from stat on the final log segment.
> Implementation would involve
> 1. Adding a new field to TopicMetadataRequest
> 2. Adding a method Log.lastModified: Long to get the last modified time from a log
> This timestamp would, of course, be subject to error in the event that the file was touched without modification, but I think that is actually okay since it provides a manual way to avoid gc'ing a topic that you  know you will want.
> It is debatable whether this should go in 0.8. It would be nice to add the field to the metadata request, at least, as that change should be easy and would avoid needing to bump the version in the future.

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

[jira] [Comment Edited] (KAFKA-566) Add last modified time to the TopicMetadataRequest

Posted by "Madhusudan C.S. (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478330#comment-13478330 ] 

Madhusudan C.S. edited comment on KAFKA-566 at 10/17/12 11:54 PM:
------------------------------------------------------------------

Makes sense, I will see if I can implement them. Btw, do we already have getMetadataRequest call implemented? I looked it up and I could not find it. Or does TopicMetadataRequest translate to getMetadataRequest for clients?
                
      was (Author: madhusudancs):
    Makes sense, I will see if I can implement them. Btw, do we already have getMetadataRequest call implemented? I looked it up and I could not find it. Or does TopicMetadataRequest translates to getMetadataRequest for clients?
                  
> Add last modified time to the TopicMetadataRequest
> --------------------------------------------------
>
>                 Key: KAFKA-566
>                 URL: https://issues.apache.org/jira/browse/KAFKA-566
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Jay Kreps
>            Priority: Blocker
>             Fix For: 0.8
>
>
> To support KAFKA-560 it would be nice to have a last modified time in the TopicMetadataRequest. This would be the timestamp of the last append to the log as taken from stat on the final log segment.
> Implementation would involve
> 1. Adding a new field to TopicMetadataRequest
> 2. Adding a method Log.lastModified: Long to get the last modified time from a log
> This timestamp would, of course, be subject to error in the event that the file was touched without modification, but I think that is actually okay since it provides a manual way to avoid gc'ing a topic that you  know you will want.
> It is debatable whether this should go in 0.8. It would be nice to add the field to the metadata request, at least, as that change should be easy and would avoid needing to bump the version in the future.

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

[jira] [Commented] (KAFKA-566) Add last modified time to the TopicMetadataRequest

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477973#comment-13477973 ] 

Jun Rao commented on KAFKA-566:
-------------------------------

Madhusudan,

Your understanding is correct. However, there is a bigger issue. The problem is that TopicMetadataRequest is designed to be served on any broker since it just gets all topic and partition info from ZK. To get log specific information such as lastModified time, the request has to be served on the broker to which a partition is assigned. So, it's likely that we will need a separate request type, something like getReplicaInforRequest. The client will first issue the getMetedataRequest to figure out which broker is hosting a partition and then issue the getReplicaInforRequest directly to the broker to get the physical information related to the replica.
                
> Add last modified time to the TopicMetadataRequest
> --------------------------------------------------
>
>                 Key: KAFKA-566
>                 URL: https://issues.apache.org/jira/browse/KAFKA-566
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Jay Kreps
>            Priority: Blocker
>             Fix For: 0.8
>
>
> To support KAFKA-560 it would be nice to have a last modified time in the TopicMetadataRequest. This would be the timestamp of the last append to the log as taken from stat on the final log segment.
> Implementation would involve
> 1. Adding a new field to TopicMetadataRequest
> 2. Adding a method Log.lastModified: Long to get the last modified time from a log
> This timestamp would, of course, be subject to error in the event that the file was touched without modification, but I think that is actually okay since it provides a manual way to avoid gc'ing a topic that you  know you will want.
> It is debatable whether this should go in 0.8. It would be nice to add the field to the metadata request, at least, as that change should be easy and would avoid needing to bump the version in the future.

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

[jira] [Commented] (KAFKA-566) Add last modified time to the TopicMetadataRequest

Posted by "Madhusudan C.S. (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477671#comment-13477671 ] 

Madhusudan C.S. commented on KAFKA-566:
---------------------------------------

I was tying to implement the steps described here and I had a few questions about it. I am new to Kafka's code base, so please help me.

TopicMetadataRequest returns multiple topics as strings and in addition each topic can have multiple partitions and the last modified timestamp is per log I guess? And there exists logs for every partition for each topic? So what do we have to return here? Isn't PartitionMetadata which is embedded in TopicMetadata a better place to return this?
                
> Add last modified time to the TopicMetadataRequest
> --------------------------------------------------
>
>                 Key: KAFKA-566
>                 URL: https://issues.apache.org/jira/browse/KAFKA-566
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Jay Kreps
>            Priority: Blocker
>             Fix For: 0.8
>
>
> To support KAFKA-560 it would be nice to have a last modified time in the TopicMetadataRequest. This would be the timestamp of the last append to the log as taken from stat on the final log segment.
> Implementation would involve
> 1. Adding a new field to TopicMetadataRequest
> 2. Adding a method Log.lastModified: Long to get the last modified time from a log
> This timestamp would, of course, be subject to error in the event that the file was touched without modification, but I think that is actually okay since it provides a manual way to avoid gc'ing a topic that you  know you will want.
> It is debatable whether this should go in 0.8. It would be nice to add the field to the metadata request, at least, as that change should be easy and would avoid needing to bump the version in the future.

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