Class LogviewerLogDownloadHandler
java.lang.Object
org.apache.storm.daemon.logviewer.handler.LogviewerLogDownloadHandler
-
Constructor Summary
ConstructorDescriptionLogviewerLogDownloadHandler
(String logRoot, String daemonLogRoot, WorkerLogs workerLogs, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
downloadDaemonLogFile
(String host, String fileName, String user) Download a daemon log.javax.ws.rs.core.Response
downloadLogFile
(String host, String fileName, String user) Download a worker log.
-
Constructor Details
-
LogviewerLogDownloadHandler
public LogviewerLogDownloadHandler(String logRoot, String daemonLogRoot, WorkerLogs workerLogs, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry) Constructor.- Parameters:
logRoot
- root worker log directorydaemonLogRoot
- root daemon log directoryworkerLogs
-WorkerLogs
resourceAuthorizer
-ResourceAuthorizer
metricsRegistry
- The logviewer metrics registry
-
-
Method Details
-
downloadLogFile
public javax.ws.rs.core.Response downloadLogFile(String host, String fileName, String user) throws IOException Download a worker log.- Parameters:
host
- host addressfileName
- file to downloaduser
- username- Returns:
- a Response which lets browsers download that file.
- Throws:
IOException
-
downloadDaemonLogFile
public javax.ws.rs.core.Response downloadDaemonLogFile(String host, String fileName, String user) throws IOException Download a daemon log.- Parameters:
host
- host addressfileName
- file to downloaduser
- username- Returns:
- a Response which lets browsers download that file.
- Throws:
IOException
-