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

Zhengdai Hu updated STORM-3140:
-------------------------------
    Summary: Duplicated method in Logviewer REST API?  (was: Duplicated method?)

> Duplicated method in Logviewer REST API?
> ----------------------------------------
>
>                 Key: STORM-3140
>                 URL: https://issues.apache.org/jira/browse/STORM-3140
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-webapp
>    Affects Versions: 2.0.0
>            Reporter: Zhengdai Hu
>            Priority: Major
>
> {code:java}
>     /**
>      * Handles '/searchLogs' request.
>      */
>     @GET
>     @Path("/searchLogs")
>     public Response searchLogs(@Context HttpServletRequest request) throws 
> IOException {
>         String user = httpCredsHandler.getUserName(request);
>         String topologyId = request.getParameter("topoId");
>         String portStr = request.getParameter("port");
>         String callback = request.getParameter("callback");
>         String origin = request.getHeader("Origin");
>         return logviewer.listLogFiles(user, portStr != null ? 
> Integer.parseInt(portStr) : null, topologyId, callback, origin);
>     }
>     /**
>      * Handles '/listLogs' request.
>      */
>     @GET
>     @Path("/listLogs")
>     public Response listLogs(@Context HttpServletRequest request) throws 
> IOException {
>         meterListLogsHttpRequests.mark();
>         String user = httpCredsHandler.getUserName(request);
>         String topologyId = request.getParameter("topoId");
>         String portStr = request.getParameter("port");
>         String callback = request.getParameter("callback");
>         String origin = request.getHeader("Origin");
>         return logviewer.listLogFiles(user, portStr != null ? 
> Integer.parseInt(portStr) : null, topologyId, callback, origin);
>     }{code}
> These two methods have identical although they seem to serve different 
> functions.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to