[ https://issues.apache.org/jira/browse/KAFKA-7618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16685453#comment-16685453 ]
ASF GitHub Bot commented on KAFKA-7618: --------------------------------------- cmccabe closed pull request #5905: KAFKA-7618: Fix /coordinator/tasks parameters to accept long values URL: https://github.com/apache/kafka/pull/5905 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tools/src/main/java/org/apache/kafka/trogdor/coordinator/CoordinatorRestResource.java b/tools/src/main/java/org/apache/kafka/trogdor/coordinator/CoordinatorRestResource.java index cbfbddd7eda..4ffee6d410c 100644 --- a/tools/src/main/java/org/apache/kafka/trogdor/coordinator/CoordinatorRestResource.java +++ b/tools/src/main/java/org/apache/kafka/trogdor/coordinator/CoordinatorRestResource.java @@ -94,10 +94,10 @@ public Empty destroyTask(@DefaultValue("") @QueryParam("taskId") String taskId) @GET @Path("/tasks") public TasksResponse tasks(@QueryParam("taskId") List<String> taskId, - @DefaultValue("0") @QueryParam("firstStartMs") int firstStartMs, - @DefaultValue("0") @QueryParam("lastStartMs") int lastStartMs, - @DefaultValue("0") @QueryParam("firstEndMs") int firstEndMs, - @DefaultValue("0") @QueryParam("lastEndMs") int lastEndMs) throws Throwable { + @DefaultValue("0") @QueryParam("firstStartMs") long firstStartMs, + @DefaultValue("0") @QueryParam("lastStartMs") long lastStartMs, + @DefaultValue("0") @QueryParam("firstEndMs") long firstEndMs, + @DefaultValue("0") @QueryParam("lastEndMs") long lastEndMs) throws Throwable { return coordinator().tasks(new TasksRequest(taskId, firstStartMs, lastStartMs, firstEndMs, lastEndMs)); } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Trogdor - Fix /tasks endpoint parameters > ---------------------------------------- > > Key: KAFKA-7618 > URL: https://issues.apache.org/jira/browse/KAFKA-7618 > Project: Kafka > Issue Type: Bug > Reporter: Stanislav Kozlovski > Assignee: Stanislav Kozlovski > Priority: Minor > > A Trogdor Coordinator's `/tasks` endpoint returns the status of all tasks. It > supports arguments to filter the tasks, like `firstStartMs`, `lastStartMs`, > `firstEndMs`, `lastEndMs`. > These arguments denote milliseconds since the unix epoch. > There is a bug currently where the endpoint parses the arguments as integers, > whereas they should be long (the current unix millisecond timestamp does not > fit into an integer). > This results in API calls returning a 404 > {code:java} > curl -v -L -G -d "firstStartMs=1542028764787" localhost:8889/coordinator/tasks > * Trying ::1... > * TCP_NODELAY set > * Connected to localhost (::1) port 8889 (#0) > > GET /coordinator/tasks?firstStartMs=154202876478 HTTP/1.1 > > Host: localhost:8889 > > User-Agent: curl/7.54.0 > > Accept: */* > > > < HTTP/1.1 500 Internal Server Error > < Date: Mon, 12 Nov 2018 13:28:59 GMT > < Content-Type: application/json > < Content-Length: 43 > < Server: Jetty(9.4.12.v20180830) > < > * Connection #0 to host localhost left intact{code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)