Class LogviewerProfileHandler
java.lang.Object
org.apache.storm.daemon.logviewer.handler.LogviewerProfileHandler
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLogviewerProfileHandler
(String logRoot, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
downloadDumpFile
(String topologyId, String hostPort, String fileName, String user) Download a dump file.javax.ws.rs.core.Response
listDumpFiles
(String topologyId, String hostPort, String user) Enumerate dump (profile) files for given worker.
-
Field Details
-
WORKER_LOG_FILENAME
- See Also:
-
-
Constructor Details
-
LogviewerProfileHandler
public LogviewerProfileHandler(String logRoot, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry) Constructor.- Parameters:
logRoot
- worker log root directoryresourceAuthorizer
-ResourceAuthorizer
metricsRegistry
- The logviewer metrisc registry
-
-
Method Details
-
listDumpFiles
public javax.ws.rs.core.Response listDumpFiles(String topologyId, String hostPort, String user) throws IOException Enumerate dump (profile) files for given worker.- Parameters:
topologyId
- topology IDhostPort
- host and port of workeruser
- username- Returns:
- The HTML page representing list page of dump files
- Throws:
IOException
-
downloadDumpFile
public javax.ws.rs.core.Response downloadDumpFile(String topologyId, String hostPort, String fileName, String user) throws IOException Download a dump file.- Parameters:
topologyId
- topology IDhostPort
- host and port of workerfileName
- dump file nameuser
- username- Returns:
- a Response which lets browsers download that file.
- Throws:
IOException
-