Class LogFileDownloader
java.lang.Object
org.apache.storm.daemon.logviewer.utils.LogFileDownloader
- 
Constructor SummaryConstructorsConstructorDescriptionLogFileDownloader(String logRoot, String daemonLogRoot, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsedownloadFile(String host, String fileName, String user, boolean isDaemon) Checks authorization for the log file and download.
- 
Constructor Details- 
LogFileDownloaderpublic LogFileDownloader(String logRoot, String daemonLogRoot, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry) Constructor.- Parameters:
- logRoot- root worker log directory
- daemonLogRoot- root daemon log directory
- resourceAuthorizer-- ResourceAuthorizer
- metricsRegistry- The logviewer metrics registry
 
 
- 
- 
Method Details- 
downloadFilepublic jakarta.ws.rs.core.Response downloadFile(String host, String fileName, String user, boolean isDaemon) throws IOException Checks authorization for the log file and download.- Parameters:
- host- host address
- fileName- file to download
- user- username
- isDaemon- true if the file is a daemon log, false if the file is an worker log
- Returns:
- a Response which lets browsers download that file.
- Throws:
- IOException
 
 
-