public class LogviewerLogPageHandler extends Object
Constructor and Description |
---|
LogviewerLogPageHandler(String logRoot,
String daemonLogRoot,
WorkerLogs workerLogs,
ResourceAuthorizer resourceAuthorizer,
StormMetricsRegistry metricsRegistry)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
daemonLogPage(String fileName,
Integer start,
Integer length,
String grep,
String user)
Provides a daemon log file to view.
|
javax.ws.rs.core.Response |
listLogFiles(String user,
Integer port,
String topologyId,
String callback,
String origin)
Enumerate worker log files for given criteria.
|
javax.ws.rs.core.Response |
logPage(String fileName,
Integer start,
Integer length,
String grep,
String user)
Provides a worker log file to view, starting from the specified position or default starting position of the most recent page.
|
public LogviewerLogPageHandler(String logRoot, String daemonLogRoot, WorkerLogs workerLogs, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry)
Constructor.
logRoot
- root worker log directorydaemonLogRoot
- root daemon log directoryworkerLogs
- WorkerLogs
resourceAuthorizer
- ResourceAuthorizer
metricsRegistry
- The logviewer metrics registrypublic javax.ws.rs.core.Response listLogFiles(String user, Integer port, String topologyId, String callback, String origin) throws IOException
Enumerate worker log files for given criteria.
user
- usernameport
- worker’s port, null for all workerstopologyId
- topology ID, null for all topologiescallback
- callbackParameterName for JSONPorigin
- originIOException
public javax.ws.rs.core.Response logPage(String fileName, Integer start, Integer length, String grep, String user) throws IOException, InvalidRequestException
Provides a worker log file to view, starting from the specified position or default starting position of the most recent page.
fileName
- file to viewstart
- start offset, or null if the most recent page is desiredlength
- length to read in this page, or null if default page length is desiredgrep
- search string if request is a result of the search, can be nulluser
- usernameIOException
InvalidRequestException
public javax.ws.rs.core.Response daemonLogPage(String fileName, Integer start, Integer length, String grep, String user) throws IOException, InvalidRequestException
Provides a daemon log file to view.
fileName
- file to viewstart
- start offset, or null if the most recent page is desiredlength
- length to read in this page, or null if default page length is desiredgrep
- search string if request is a result of the search, can be nulluser
- usernameIOException
InvalidRequestException
Copyright © 2022 The Apache Software Foundation. All rights reserved.