deniskuzZ commented on code in PR #5281:
URL: https://github.com/apache/hive/pull/5281#discussion_r1629130338


##########
common/src/java/org/apache/hive/http/ProfileServlet.java:
##########
@@ -293,6 +295,16 @@ protected void doGet(final HttpServletRequest req, final 
HttpServletResponse res
     }
   }
 
+  /**
+   * Get the path of the profiler script to be executed.
+   * Before async-profiler 3.0, the script was named profiler.sh, and after 
3.0 it's bin/asprof
+   * @return
+   */
+  private String getProfilerScriptPath() {
+    return Files.exists(Paths.get(asyncProfilerHome + "/bin/asprof")) ? 
(asyncProfilerHome + "/bin/asprof")

Review Comment:
   ````
   Path defaultPath = Paths.get(asyncProfilerHome + "/bin/asprof");
   return Files.exists(defaultPath)? defaultPath.toString() : asyncProfilerHome 
+ "/profiler.sh"
   ````



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to