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)
logRoot
- root worker log directorydaemonLogRoot
- root daemon log directoryresourceAuthorizer
- ResourceAuthorizer
metricsRegistry
- The logviewer metrics registrypublic javax.ws.rs.core.Response downloadFile(String host, String fileName, String user, boolean isDaemon) throws IOException
host
- host addressfileName
- file to downloaduser
- usernameisDaemon
- true if the file is a daemon log, false if the file is an worker logIOException
Copyright © 2023 The Apache Software Foundation. All rights reserved.