public class LogFileDownloader extends Object
Constructor and Description |
---|
LogFileDownloader(String logRoot,
String daemonLogRoot,
ResourceAuthorizer resourceAuthorizer,
StormMetricsRegistry metricsRegistry)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
downloadFile(String fileName,
String user,
boolean isDaemon)
Checks authorization for the log file and download.
|
public LogFileDownloader(String logRoot, String daemonLogRoot, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry)
Constructor.
logRoot
- root worker log directorydaemonLogRoot
- root daemon log directoryresourceAuthorizer
- ResourceAuthorizer
metricsRegistry
- The logviewer metrics registrypublic javax.ws.rs.core.Response downloadFile(String fileName, String user, boolean isDaemon) throws IOException
Checks authorization for the log file and download.
fileName
- file to downloaduser
- usernameisDaemon
- true if the file is a daemon log, false if the file is an worker logIOException
Copyright © 2019 The Apache Software Foundation. All rights reserved.