abstractdog commented on code in PR #527:
URL: https://github.com/apache/tez/pull/527#discussion_r3650007868


##########
tez-common/src/main/java/org/apache/tez/common/web/ProfileServlet.java:
##########
@@ -278,41 +266,39 @@ public void doGet(HttpServletRequest request, 
HttpServletResponse response) thro
             response.setHeader("Refresh", (duration + refreshDelay) + "; URL=" 
+ relativeUrl + '?'
                 + ProfileOutputServlet.FILE_QUERY_PARAM + '=' + 
outputFile.getName());
 
-            out.println("Profiled PID: " + pid);
-            out.println("Started [" + event.getInternalName()
+            response.getWriter().println("Profiled PID: " + pid);
+            response.getWriter().println("Started [" + event.getInternalName()
                 + "] profiling. This page will automatically redirect to "
                 + relativeUrl + " after " + duration + " 
seconds.\n\ncommand:\n" + Joiner.on(" ").join(cmd));
-            out.flush();
+            response.getWriter().flush();

Review Comment:
   would it make sense to declare `PrintWriter writer = response.getWriter();`? 
it's used 3 times



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to