[jira] [Commented] (KAFKA-3312) Add a offsets methods to ZkUtils and replace relevant usages
[ https://issues.apache.org/jira/browse/KAFKA-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15274984#comment-15274984 ] ASF GitHub Bot commented on KAFKA-3312: --- Github user vahidhashemian closed the pull request at: https://github.com/apache/kafka/pull/1025 > Add a offsets methods to ZkUtils and replace relevant usages > > > Key: KAFKA-3312 > URL: https://issues.apache.org/jira/browse/KAFKA-3312 > Project: Kafka > Issue Type: Improvement >Reporter: Grant Henke >Assignee: Vahid Hashemian > > There are many places in the code that manually build a zookeeper path and > get or update offsets. Moving this logic to a common location in ZkUtils > would be nice. > Ex: > {code} > zkUtils.readDataMaybeNull(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}")._1 > {code} > {code} > zkUtils.readData(topicDirs.consumerOffsetDir + "/" + > topicAndPartition.partition)._1.toLong > {code} > {code} > zkUtils.updatePersistentPath(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}", > partitionData.offset.toString) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3312) Add a offsets methods to ZkUtils and replace relevant usages
[ https://issues.apache.org/jira/browse/KAFKA-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15274985#comment-15274985 ] ASF GitHub Bot commented on KAFKA-3312: --- GitHub user vahidhashemian reopened a pull request: https://github.com/apache/kafka/pull/1025 KAFKA-3312: Add utility offset methods to ZkUtils Create utility getOffset(...) and updateOffset(...) methods to replace readData(...), readDataMaybeNull(...) and updatePersistentPath(...) method calls where they deal with getting or setting offsets. You can merge this pull request into a Git repository by running: $ git pull https://github.com/vahidhashemian/kafka KAFKA-3312 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1025.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1025 commit d379ef6944e7dbed930f97ff51f6c9f98e9f9376 Author: Vahid HashemianDate: 2016-03-05T00:47:05Z KAFKA-3312: Add utility offset methods to ZkUtils Create utility getOffset(...) and updateOffset(...) methods to replace readData(...), readDataMaybeNull(...) and updatePersistentPath(...) method calls where they deal with getting or setting offsets. > Add a offsets methods to ZkUtils and replace relevant usages > > > Key: KAFKA-3312 > URL: https://issues.apache.org/jira/browse/KAFKA-3312 > Project: Kafka > Issue Type: Improvement >Reporter: Grant Henke >Assignee: Vahid Hashemian > > There are many places in the code that manually build a zookeeper path and > get or update offsets. Moving this logic to a common location in ZkUtils > would be nice. > Ex: > {code} > zkUtils.readDataMaybeNull(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}")._1 > {code} > {code} > zkUtils.readData(topicDirs.consumerOffsetDir + "/" + > topicAndPartition.partition)._1.toLong > {code} > {code} > zkUtils.updatePersistentPath(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}", > partitionData.offset.toString) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3312) Add a offsets methods to ZkUtils and replace relevant usages
[ https://issues.apache.org/jira/browse/KAFKA-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15186032#comment-15186032 ] ASF GitHub Bot commented on KAFKA-3312: --- GitHub user vahidhashemian reopened a pull request: https://github.com/apache/kafka/pull/1025 KAFKA-3312: Add utility offset methods to ZkUtils You can merge this pull request into a Git repository by running: $ git pull https://github.com/vahidhashemian/kafka KAFKA-3312 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1025.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1025 commit 8ee7711d11c6eb32f160c66202c54af2e17c3ed6 Author: Vahid HashemianDate: 2016-03-05T00:47:05Z KAFKA-3312: Add utility offset methods to ZkUtils > Add a offsets methods to ZkUtils and replace relevant usages > > > Key: KAFKA-3312 > URL: https://issues.apache.org/jira/browse/KAFKA-3312 > Project: Kafka > Issue Type: Improvement >Reporter: Grant Henke >Assignee: Vahid Hashemian > > There are many places in the code that manually build a zookeeper path and > get or update offsets. Moving this logic to a common location in ZkUtils > would be nice. > Ex: > {code} > zkUtils.readDataMaybeNull(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}")._1 > {code} > {code} > zkUtils.readData(topicDirs.consumerOffsetDir + "/" + > topicAndPartition.partition)._1.toLong > {code} > {code} > zkUtils.updatePersistentPath(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}", > partitionData.offset.toString) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3312) Add a offsets methods to ZkUtils and replace relevant usages
[ https://issues.apache.org/jira/browse/KAFKA-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15186031#comment-15186031 ] ASF GitHub Bot commented on KAFKA-3312: --- Github user vahidhashemian closed the pull request at: https://github.com/apache/kafka/pull/1025 > Add a offsets methods to ZkUtils and replace relevant usages > > > Key: KAFKA-3312 > URL: https://issues.apache.org/jira/browse/KAFKA-3312 > Project: Kafka > Issue Type: Improvement >Reporter: Grant Henke >Assignee: Vahid Hashemian > > There are many places in the code that manually build a zookeeper path and > get or update offsets. Moving this logic to a common location in ZkUtils > would be nice. > Ex: > {code} > zkUtils.readDataMaybeNull(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}")._1 > {code} > {code} > zkUtils.readData(topicDirs.consumerOffsetDir + "/" + > topicAndPartition.partition)._1.toLong > {code} > {code} > zkUtils.updatePersistentPath(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}", > partitionData.offset.toString) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3312) Add a offsets methods to ZkUtils and replace relevant usages
[ https://issues.apache.org/jira/browse/KAFKA-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15185731#comment-15185731 ] ASF GitHub Bot commented on KAFKA-3312: --- GitHub user vahidhashemian reopened a pull request: https://github.com/apache/kafka/pull/1025 KAFKA-3312: Add utility offset methods to ZkUtils You can merge this pull request into a Git repository by running: $ git pull https://github.com/vahidhashemian/kafka KAFKA-3312 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1025.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1025 commit 8ee7711d11c6eb32f160c66202c54af2e17c3ed6 Author: Vahid HashemianDate: 2016-03-05T00:47:05Z KAFKA-3312: Add utility offset methods to ZkUtils > Add a offsets methods to ZkUtils and replace relevant usages > > > Key: KAFKA-3312 > URL: https://issues.apache.org/jira/browse/KAFKA-3312 > Project: Kafka > Issue Type: Improvement >Reporter: Grant Henke >Assignee: Vahid Hashemian > > There are many places in the code that manually build a zookeeper path and > get or update offsets. Moving this logic to a common location in ZkUtils > would be nice. > Ex: > {code} > zkUtils.readDataMaybeNull(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}")._1 > {code} > {code} > zkUtils.readData(topicDirs.consumerOffsetDir + "/" + > topicAndPartition.partition)._1.toLong > {code} > {code} > zkUtils.updatePersistentPath(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}", > partitionData.offset.toString) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3312) Add a offsets methods to ZkUtils and replace relevant usages
[ https://issues.apache.org/jira/browse/KAFKA-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15183797#comment-15183797 ] ASF GitHub Bot commented on KAFKA-3312: --- GitHub user vahidhashemian opened a pull request: https://github.com/apache/kafka/pull/1025 KAFKA-3312: Add utility offset methods to ZkUtils You can merge this pull request into a Git repository by running: $ git pull https://github.com/vahidhashemian/kafka KAFKA-3312 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1025.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1025 commit ac6d6926d5e23640b53fa2bca927ae5e423c12f7 Author: Vahid HashemianDate: 2016-03-05T00:47:05Z KAFKA-3312: Add utility offset methods to ZkUtils > Add a offsets methods to ZkUtils and replace relevant usages > > > Key: KAFKA-3312 > URL: https://issues.apache.org/jira/browse/KAFKA-3312 > Project: Kafka > Issue Type: Improvement >Affects Versions: 0.9.0.1 >Reporter: Grant Henke >Assignee: Vahid Hashemian > > There are many places in the code that manually build a zookeeper path and > get or update offsets. Moving this logic to a common location in ZkUtils > would be nice. > Ex: > {code} > zkUtils.readDataMaybeNull(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}")._1 > {code} > {code} > zkUtils.readData(topicDirs.consumerOffsetDir + "/" + > topicAndPartition.partition)._1.toLong > {code} > {code} > zkUtils.updatePersistentPath(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}", > partitionData.offset.toString) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3312) Add a offsets methods to ZkUtils and replace relevant usages
[ https://issues.apache.org/jira/browse/KAFKA-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15180398#comment-15180398 ] Grant Henke commented on KAFKA-3312: [~vahid] Yes, but I was thinking no only building the path, but actually add methods like getOffset and updateOffset that takes care of calling zookeeper all together. > Add a offsets methods to ZkUtils and replace relevant usages > > > Key: KAFKA-3312 > URL: https://issues.apache.org/jira/browse/KAFKA-3312 > Project: Kafka > Issue Type: Improvement >Affects Versions: 0.9.0.1 >Reporter: Grant Henke >Assignee: Vahid Hashemian > > There are many places in the code that manually build a zookeeper path and > get or update offsets. Moving this logic to a common location in ZkUtils > would be nice. > Ex: > {code} > zkUtils.readDataMaybeNull(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}")._1 > {code} > {code} > zkUtils.readData(topicDirs.consumerOffsetDir + "/" + > topicAndPartition.partition)._1.toLong > {code} > {code} > zkUtils.updatePersistentPath(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}", > partitionData.offset.toString) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3312) Add a offsets methods to ZkUtils and replace relevant usages
[ https://issues.apache.org/jira/browse/KAFKA-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15180394#comment-15180394 ] Vahid Hashemian commented on KAFKA-3312: [~granthenke] Just to clarify, do you mean have some helper function in ZkUtils to build paths out of zookeeper node names? Thanks. > Add a offsets methods to ZkUtils and replace relevant usages > > > Key: KAFKA-3312 > URL: https://issues.apache.org/jira/browse/KAFKA-3312 > Project: Kafka > Issue Type: Improvement >Affects Versions: 0.9.0.1 >Reporter: Grant Henke >Assignee: Vahid Hashemian > > There are many places in the code that manually build a zookeeper path and > get or update offsets. Moving this logic to a common location in ZkUtils > would be nice. > Ex: > {code} > zkUtils.readDataMaybeNull(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}")._1 > {code} > {code} > zkUtils.readData(topicDirs.consumerOffsetDir + "/" + > topicAndPartition.partition)._1.toLong > {code} > {code} > zkUtils.updatePersistentPath(s"${topicDirs.consumerOffsetDir}/${topicPartition.partition}", > partitionData.offset.toString) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)