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 host,
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 - ResourceAuthorizermetricsRegistry - The logviewer metrics registrypublic javax.ws.rs.core.Response downloadFile(String host, String fileName, String user, boolean isDaemon) throws IOException
Checks authorization for the log file and download.
host - host addressfileName - file to downloaduser - usernameisDaemon - true if the file is a daemon log, false if the file is an worker logIOExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.