public class HTTPRequest extends Object implements Serializable
HTTPRequest
describes and implements a Beam pipeline for analysis of HTTP requests using
log data.Modifier and Type | Class and Description |
---|---|
static class |
HTTPRequest.Has4xxRequestStatus
Function to be used with filter transform in order to include only client errors
|
static interface |
HTTPRequest.HTTPRequestOptions
Runtime options for
HTTPRequest pipeline. |
static class |
HTTPRequest.KeyAndWindowForSessionsFireEarly
Key requests for session analysis and window into sessions
|
static class |
HTTPRequest.WindowForFixed
Window events into fixed one minute windows
|
Constructor and Description |
---|
HTTPRequest() |
Modifier and Type | Method and Description |
---|---|
static void |
addToggleCacheEntry(String name,
HTTPRequestToggles entry)
Add an entry to the HTTPRequest toggle cache
|
static String |
buildConfigurationTick(HTTPRequest.HTTPRequestOptions options,
HTTPRequestToggles toggles)
Build a configuration tick for HTTPRequest given pipeline options and configuration toggles
|
static org.apache.beam.sdk.values.PCollection<Alert> |
expandInputMap(org.apache.beam.sdk.Pipeline p,
org.apache.beam.sdk.values.PCollectionTuple input,
HTTPRequest.HTTPRequestOptions options)
Expand the input collection tuple, executing analysis transforms for each element
|
static Input |
getInput(org.apache.beam.sdk.Pipeline p,
HTTPRequest.HTTPRequestOptions options)
Given HTTPRequest pipeline options, return a configured
Input class |
static void |
main(String[] args)
Entry point for Beam pipeline.
|
static org.apache.beam.sdk.values.PCollectionTuple |
readInput(org.apache.beam.sdk.Pipeline p,
Input input,
HTTPRequest.HTTPRequestOptions options)
Read from a configured
Input object, returning a PCollectionTuple of events |
public static void addToggleCacheEntry(String name, HTTPRequestToggles entry)
For use in tests, should not be called under normal use.
name
- Cache key nameentry
- Cache entrypublic static String buildConfigurationTick(HTTPRequest.HTTPRequestOptions options, HTTPRequestToggles toggles) throws IOException
options
- Pipeline optionstoggles
- Analysis togglesIOException
- IOExceptionpublic static Input getInput(org.apache.beam.sdk.Pipeline p, HTTPRequest.HTTPRequestOptions options) throws IOException
Input
class
The returned input object will be configured based on the HTTPRequest pipeline options, and will have all applicable filters assigned.
p
- Pipelineoptions
- Pipeline optionsIOException
- IOExceptionpublic static org.apache.beam.sdk.values.PCollectionTuple readInput(org.apache.beam.sdk.Pipeline p, Input input, HTTPRequest.HTTPRequestOptions options)
Input
object, returning a PCollectionTuple of events
The PCollectionTuple that is returned contains PCollections tagged by resource indicator. Each PCollection contains only events and uses the resource indicator as the TupleTag id.
p
- Pipelineinput
- Configured Input
objectoptions
- Pipeline optionspublic static org.apache.beam.sdk.values.PCollection<Alert> expandInputMap(org.apache.beam.sdk.Pipeline p, org.apache.beam.sdk.values.PCollectionTuple input, HTTPRequest.HTTPRequestOptions options)
p
- Pipelineinput
- PCollectionTuple using resource name as tag idoptions
- Pipeline optionsCopyright © 2022. All rights reserved.