Package org.apache.hadoop.hbase.http
Class LibraryBackend
java.lang.Object
org.apache.hadoop.hbase.http.LibraryBackend
- All Implemented Interfaces:
ProfilerBackend
Backend that uses the async-profiler Java API (in-process). Requires the
tools.profiler:async-profiler JAR and its native library on the classpath.
This class is intentionally isolated in its own file so that the JVM never loads
one.profiler.AsyncProfiler on systems where the JAR is absent. It is only instantiated
reflectively from ProfilerBackend.detect(java.lang.String) after confirming the class is resolvable.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Cleans up any resources (e.g.executeStart(ProfileServlet.ProfileRequest request, File outputFile) Executes a profiling start command and returns the profiler's response.executeStop(ProfileServlet.ProfileRequest request, File outputFile) Executes a profiling stop/dump command.
-
Field Details
-
LOG
-
-
Constructor Details
-
LibraryBackend
-
-
Method Details
-
executeStart
public String executeStart(ProfileServlet.ProfileRequest request, File outputFile) throws IOException Description copied from interface:ProfilerBackendExecutes a profiling start command and returns the profiler's response.- Specified by:
executeStartin interfaceProfilerBackend- Throws:
IOException
-
executeStop
public String executeStop(ProfileServlet.ProfileRequest request, File outputFile) throws IOException Description copied from interface:ProfilerBackendExecutes a profiling stop/dump command.- Specified by:
executeStopin interfaceProfilerBackend- Throws:
IOException
-
destroy
Description copied from interface:ProfilerBackendCleans up any resources (e.g. kills a running process). Called on servlet destroy.- Specified by:
destroyin interfaceProfilerBackend
-