public class LogviewerLogSearchHandler extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LogviewerLogSearchHandler.Matched |
Modifier and Type | Field and Description |
---|---|
static int |
GREP_BUF_SIZE |
static int |
GREP_CONTEXT_SIZE |
static int |
GREP_MAX_SEARCH_SIZE |
static Pattern |
WORKER_LOG_FILENAME_PATTERN |
Constructor and Description |
---|
LogviewerLogSearchHandler(Map<String,Object> stormConf,
Path logRoot,
Path daemonLogRoot,
ResourceAuthorizer resourceAuthorizer,
StormMetricsRegistry metricsRegistry)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
deepSearchLogsForTopology(String topologyId,
String user,
String search,
String numMatchesStr,
String portStr,
String fileOffsetStr,
String offsetStr,
Boolean searchArchived,
String callback,
String origin)
Advanced search across worker log files in a topology.
|
javax.ws.rs.core.Response |
searchLogFile(String fileName,
String user,
boolean isDaemon,
String search,
String numMatchesStr,
String offsetStr,
String callback,
String origin)
Search from a worker log file.
|
public static final int GREP_MAX_SEARCH_SIZE
public static final int GREP_BUF_SIZE
public static final int GREP_CONTEXT_SIZE
public static final Pattern WORKER_LOG_FILENAME_PATTERN
public LogviewerLogSearchHandler(Map<String,Object> stormConf, Path logRoot, Path daemonLogRoot, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry)
Constructor.
stormConf
- storm configurationlogRoot
- log root directorydaemonLogRoot
- daemon log root directoryresourceAuthorizer
- ResourceAuthorizer
metricsRegistry
- The logviewer metrics registrypublic javax.ws.rs.core.Response searchLogFile(String fileName, String user, boolean isDaemon, String search, String numMatchesStr, String offsetStr, String callback, String origin) throws IOException, InvalidRequestException
Search from a worker log file.
fileName
- log fileuser
- usernameisDaemon
- whether the log file is regarding worker or daemonsearch
- search stringnumMatchesStr
- the count of maximum matchesoffsetStr
- start offset for log filecallback
- callbackParameterName for JSONPorigin
- originIOException
InvalidRequestException
public javax.ws.rs.core.Response deepSearchLogsForTopology(String topologyId, String user, String search, String numMatchesStr, String portStr, String fileOffsetStr, String offsetStr, Boolean searchArchived, String callback, String origin) throws IOException
Advanced search across worker log files in a topology.
topologyId
- topology IDuser
- usernamesearch
- search stringnumMatchesStr
- the count of maximum matches. Note that this number is with respect to each port, not to each log or each search requestportStr
- worker port, null or ‘*’ if the request wants to search from all worker logsfileOffsetStr
- index (offset) of the log filesoffsetStr
- start offset for log filesearchArchived
- true if the request wants to search also archived files, false if notcallback
- callbackParameterName for JSONPorigin
- originIOException
Copyright © 2020 The Apache Software Foundation. All rights reserved.