[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1

2015-04-16 Thread alexcb (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14498307#comment-14498307
 ] 

alexcb commented on KAFKA-2098:
---

Thanks for the notes everyone.

gradlew (the gradle wrapper) is designed to allow users who do not have gradle 
setup to build the project. If you require gradle to be setup ahead of time, 
then it seems like one could just use gradle directly.

For example:

{noformat}
[root@feb6842638b9 kafkatest]# tar xzf kafka-0.8.2.1-src.tgz 
[root@feb6842638b9 kafkatest]# cd kafka-0.8.2.1-src
[root@feb6842638b9 kafka-0.8.2.1-src]# rm gradlew gradlew.bat   *** me 
simulating removing these files from the release
[root@feb6842638b9 kafka-0.8.2.1-src]# gradle jar

... output removed...

:core:processResources UP-TO-DATE
:core:classes
:core:copyDependantLibs
:core:jar
:examples:compileJava
:examples:processResources UP-TO-DATE
:examples:classes
:examples:jar
:contrib:hadoop-consumer:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:contrib:hadoop-consumer:processResources UP-TO-DATE
:contrib:hadoop-consumer:classes
:contrib:hadoop-consumer:jar
:contrib:hadoop-producer:compileJava
:contrib:hadoop-producer:processResources UP-TO-DATE
:contrib:hadoop-producer:classes
:contrib:hadoop-producer:jar

BUILD SUCCESSFUL
{noformat}

By using this directly, we 1) avoid the confusion of distributing a non-working 
gradle wrapper, and 2) bypass the wrapper and just use gradle directly.

Thanks.

 Gradle Wrapper Jar gone missing in 0.8.2.1
 --

 Key: KAFKA-2098
 URL: https://issues.apache.org/jira/browse/KAFKA-2098
 Project: Kafka
  Issue Type: Bug
  Components: build
Affects Versions: 0.8.2.1
Reporter: Rekha Joshi
Assignee: Rekha Joshi

 ./gradlew idea
 Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
 This was working in 0.8.2.Attaching patch.Thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1

2015-04-16 Thread alexcb (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14498750#comment-14498750
 ] 

alexcb commented on KAFKA-2098:
---

Perhaps I was unclear in what I was suggesting. Since [~gwenshap] mentioned 
that we don't want jars in the release, which I completely agree with, then we 
should also remove the auto generated gradlew and gradlew.bat scripts.

When gradlew is run, it hardcodes the CLASSPATH to 
./gradle/wrapper/gradle-wrapper.jar; and I don't see any mechanism in the 
script to include a user defined CLASSPATH. I fail to see how it's even 
possible to run gradlew in it's current state without running gradle first.

Can you elaborate on how this is possible to use the gradlew script without 
running gradle first? i.e. how does it run if 
./gradle/wrapper/gradle-wrapper.jar does not exist.

 Gradle Wrapper Jar gone missing in 0.8.2.1
 --

 Key: KAFKA-2098
 URL: https://issues.apache.org/jira/browse/KAFKA-2098
 Project: Kafka
  Issue Type: Bug
  Components: build
Affects Versions: 0.8.2.1
Reporter: Rekha Joshi
Assignee: Rekha Joshi

 ./gradlew idea
 Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
 This was working in 0.8.2.Attaching patch.Thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1

2015-04-15 Thread alexcb (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14497159#comment-14497159
 ] 

alexcb commented on KAFKA-2098:
---

The comment about not committing binaries goes directly against the userguide 
of gradle:

from http://gradle.org/docs/current/userguide/gradle_wrapper.html

{quote}
All of these files should be submitted to your version control system. This 
only needs to be done once. After these files have been added to the project, 
the project should then be built with the added gradlew command. The gradlew 
command can be used exactly the same way as the gradle command. 
{quote}

The kafka README states that one must first run gradle, then run ./gradlew 
jar. The gradle command generates the gradlew script. If we don't want to 
add binaries to the source revision (a noble cause), then perhaps one should 
also avoid adding generated files such as the gradlew file.

I personally lost an hour on this issue already.

 Gradle Wrapper Jar gone missing in 0.8.2.1
 --

 Key: KAFKA-2098
 URL: https://issues.apache.org/jira/browse/KAFKA-2098
 Project: Kafka
  Issue Type: Bug
  Components: build
Affects Versions: 0.8.2.1
Reporter: Rekha Joshi

 ./gradlew idea
 Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
 This was working in 0.8.2.Attaching patch.Thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13985940#comment-13985940
 ] 

alexcb commented on KAFKA-1425:
---

Created reviewboard  against branch origin/trunk

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

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

alexcb updated KAFKA-1425:
--

Attachment: (was: add-start-offset-to-kafka.patch)

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

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

alexcb updated KAFKA-1425:
--

Attachment: KAFKA-1425.patch

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13985942#comment-13985942
 ] 

alexcb commented on KAFKA-1425:
---

Thanks Neha -- I've updated the patch using the kafka-patch-review.py script 
(which worked really well)

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13986195#comment-13986195
 ] 

alexcb commented on KAFKA-1425:
---

Created reviewboard  against branch trunk

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch, KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

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

alexcb updated KAFKA-1425:
--

Attachment: KAFKA-1425.patch

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch, KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13986199#comment-13986199
 ] 

alexcb commented on KAFKA-1425:
---

yup sure enough, the kafka-patch-review.py does not appear to be checking for 
errors and will happily move on and upload a patch.

[vagrant@centosdev kafka_git_repo]$ python2.7 kafka-patch-review.py -b trunk -j 
KAFKA-1425
Configuring reviewboard url to https://reviews.apache.org
Updating your remote branches to pull the latest changes
sh: post-review: command not found
Creating diff against trunk and uploading patch to JIRA KAFKA-1425
Created a new reviewboard  


 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch, KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

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

alexcb updated KAFKA-1425:
--

Attachment: KAFKA-1425.patch

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch, KAFKA-1425.patch, KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13986202#comment-13986202
 ] 

alexcb commented on KAFKA-1425:
---

Created reviewboard  against branch trunk

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch, KAFKA-1425.patch, KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-30 Thread alexcb (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13986215#comment-13986215
 ] 

alexcb commented on KAFKA-1425:
---

the post-review command has been removed in the latest reviewboardtool 
(actually, looks like from current dev version), it's been replaced with the 
rbt post command.

The rbt command obsoletes the old “post-review” command. For built in help you 
may execute: -- from: http://www.reviewboard.org/docs/rbtools/dev/

I didn't ask for the dev version, but somehow that's what I got.

Anyways, I ran:

rbt post --tracking-branch=origin/trunk

which uploaded:

https://reviews.apache.org/r/20927/

I hope this is enough for you to review the changes.

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: KAFKA-1425.patch, KAFKA-1425.patch, KAFKA-1425.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-25 Thread alexcb (JIRA)
alexcb created KAFKA-1425:
-

 Summary: provide logStartOffset in addition to LogEndOffset metric
 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor


Hello,

Would it be possible to include a metric to report the minimum message offset 
for each topic/partition? This would mirror the LogEndOffset which is already 
provided.

There's also a Size metric that's provided; however, this gives us the size of 
a topic/partition in bytes so I'm unable to calculate the Starting/beginning 
message offset based on the end offset.

Thanks,
Alex

Here's an initial patch which I have used against 0.8.1:

--- kafka-0.8.1-src/core/src/main/scala/kafka/log/Log.scala 2014-04-25 
09:53:00.252614353 -0700
+++ kafka-0.8.1-src-patch/core/src/main/scala/kafka/log/Log.scala   
2014-04-25 11:38:32.610614193 -0700
@@ -76,6 +76,15 @@
   newGauge(name + - + LogEndOffset,
new Gauge[Long] { def value = logEndOffset })
 
+  newGauge(name + - + logStartOffset,
+   new Gauge[Long] { def value = logStartOffset })
+
   /** The name of this log */
   def name  = dir.getName()
 
@@ -421,6 +430,11 @@
   def size: Long = logSegments.map(_.size).sum
 
   /**
+   * The earliest message offset in the log
+   */
+  def logStartOffset: Long = logSegments.map(_.baseOffset).min
+
+  /**
*  The offset of the next message that will be appended to the log
*/
   def logEndOffset: Long = nextOffset.get



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-25 Thread alexcb (JIRA)

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

alexcb updated KAFKA-1425:
--

Attachment: add-start-offset-to-kafka.patch

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: add-start-offset-to-kafka.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 Thanks,
 Alex
 Here's an initial patch which I have used against 0.8.1:
 --- kafka-0.8.1-src/core/src/main/scala/kafka/log/Log.scala   2014-04-25 
 09:53:00.252614353 -0700
 +++ kafka-0.8.1-src-patch/core/src/main/scala/kafka/log/Log.scala 
 2014-04-25 11:38:32.610614193 -0700
 @@ -76,6 +76,15 @@
newGauge(name + - + LogEndOffset,
 new Gauge[Long] { def value = logEndOffset })
  
 +  newGauge(name + - + logStartOffset,
 +   new Gauge[Long] { def value = logStartOffset })
 +
/** The name of this log */
def name  = dir.getName()
  
 @@ -421,6 +430,11 @@
def size: Long = logSegments.map(_.size).sum
  
/**
 +   * The earliest message offset in the log
 +   */
 +  def logStartOffset: Long = logSegments.map(_.baseOffset).min
 +
 +  /**
 *  The offset of the next message that will be appended to the log
 */
def logEndOffset: Long = nextOffset.get



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-25 Thread alexcb (JIRA)

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

alexcb updated KAFKA-1425:
--

Description: 
Hello,

Would it be possible to include a metric to report the minimum message offset 
for each topic/partition? This would mirror the LogEndOffset which is already 
provided.

There's also a Size metric that's provided; however, this gives us the size of 
a topic/partition in bytes so I'm unable to calculate the Starting/beginning 
message offset based on the end offset.

I've attached a patch I used with kafka 0.8.1 to expose this metric.

Thanks,
Alex

  was:
Hello,

Would it be possible to include a metric to report the minimum message offset 
for each topic/partition? This would mirror the LogEndOffset which is already 
provided.

There's also a Size metric that's provided; however, this gives us the size of 
a topic/partition in bytes so I'm unable to calculate the Starting/beginning 
message offset based on the end offset.

Thanks,
Alex

Here's an initial patch which I have used against 0.8.1:

--- kafka-0.8.1-src/core/src/main/scala/kafka/log/Log.scala 2014-04-25 
09:53:00.252614353 -0700
+++ kafka-0.8.1-src-patch/core/src/main/scala/kafka/log/Log.scala   
2014-04-25 11:38:32.610614193 -0700
@@ -76,6 +76,15 @@
   newGauge(name + - + LogEndOffset,
new Gauge[Long] { def value = logEndOffset })
 
+  newGauge(name + - + logStartOffset,
+   new Gauge[Long] { def value = logStartOffset })
+
   /** The name of this log */
   def name  = dir.getName()
 
@@ -421,6 +430,11 @@
   def size: Long = logSegments.map(_.size).sum
 
   /**
+   * The earliest message offset in the log
+   */
+  def logStartOffset: Long = logSegments.map(_.baseOffset).min
+
+  /**
*  The offset of the next message that will be appended to the log
*/
   def logEndOffset: Long = nextOffset.get


 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: add-start-offset-to-kafka.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-25 Thread alexcb (JIRA)

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

alexcb updated KAFKA-1425:
--

Attachment: (was: add-start-offset-to-kafka.patch)

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor

 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (KAFKA-1425) provide logStartOffset in addition to LogEndOffset metric

2014-04-25 Thread alexcb (JIRA)

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

alexcb updated KAFKA-1425:
--

Attachment: add-start-offset-to-kafka.patch

 provide logStartOffset in addition to LogEndOffset metric
 -

 Key: KAFKA-1425
 URL: https://issues.apache.org/jira/browse/KAFKA-1425
 Project: Kafka
  Issue Type: Improvement
Reporter: alexcb
Priority: Minor
 Attachments: add-start-offset-to-kafka.patch


 Hello,
 Would it be possible to include a metric to report the minimum message offset 
 for each topic/partition? This would mirror the LogEndOffset which is already 
 provided.
 There's also a Size metric that's provided; however, this gives us the size 
 of a topic/partition in bytes so I'm unable to calculate the 
 Starting/beginning message offset based on the end offset.
 I've attached a patch I used with kafka 0.8.1 to expose this metric.
 Thanks,
 Alex



--
This message was sent by Atlassian JIRA
(v6.2#6252)