Ethanlm commented on a change in pull request #3030: [STORM-3411] add parent
dir name to downloaded worker log file
URL: https://github.com/apache/storm/pull/3030#discussion_r298754776
##########
File path:
storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/webapp/LogviewerResource.java
##########
@@ -229,9 +229,11 @@ public Response listDumpFiles(@PathParam("topo-id")
String topologyId, @PathPara
@Path("/dumps/{topo-id}/{host-port}/{filename}")
public Response downloadDumpFile(@PathParam("topo-id") String topologyId,
@PathParam("host-port") String hostPort,
@PathParam("filename") String fileName,
@Context HttpServletRequest request) throws IOException {
+ String host = request.getRemoteHost();
Review comment:
It doesn't look right to me to use `getRemoteHost`.
It returns the client that sends the request. What's needed here is the
hostname where the log is.
https://javaee.github.io/javaee-spec/javadocs/javax/servlet/ServletRequest.html#getRemoteHost--
Please correct me if I am wrong
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services