kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-3397: use -1(latest) as time default value for tools.GetOffsetShell
Date Fri, 18 Mar 2016 20:43:17 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk d9bf55171 -> 07360cb0d


KAFKA-3397: use -1(latest) as time default value for tools.GetOffsetShell

minor fix for prompt the user, or we will get a error message:
>Missing required argument "[time]"

Author: Xin Wang <best.wangxin@163.com>

Reviewers: Ashish Singh, Guozhang Wang

Closes #1068 from vesense/patch-4


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/07360cb0
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/07360cb0
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/07360cb0

Branch: refs/heads/trunk
Commit: 07360cb0d24b18f6f7c8a35d437c7cb2b0142506
Parents: d9bf551
Author: Xin Wang <best.wangxin@163.com>
Authored: Fri Mar 18 13:43:13 2016 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Fri Mar 18 13:43:13 2016 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/tools/GetOffsetShell.scala | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/07360cb0/core/src/main/scala/kafka/tools/GetOffsetShell.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/GetOffsetShell.scala b/core/src/main/scala/kafka/tools/GetOffsetShell.scala
index 3d9293e..30c7afe 100644
--- a/core/src/main/scala/kafka/tools/GetOffsetShell.scala
+++ b/core/src/main/scala/kafka/tools/GetOffsetShell.scala
@@ -47,6 +47,7 @@ object GetOffsetShell {
                            .withRequiredArg
                            .describedAs("timestamp/-1(latest)/-2(earliest)")
                            .ofType(classOf[java.lang.Long])
+                           .defaultsTo(-1)
     val nOffsetsOpt = parser.accepts("offsets", "number of offsets returned")
                            .withRequiredArg
                            .describedAs("count")


Mime
View raw message