App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Static Public Attributes | List of all members
google.appengine.ext.mapreduce.input_readers.LogInputReader Class Reference
Inheritance diagram for google.appengine.ext.mapreduce.input_readers.LogInputReader:
google.appengine.ext.mapreduce.input_readers.InputReader google.appengine.ext.mapreduce.json_util.JsonMixin

Public Member Functions

def __init__
 
def __iter__
 
def from_json
 
def to_json
 
def split_input
 
def validate
 
def __str__
 
- Public Member Functions inherited from google.appengine.ext.mapreduce.input_readers.InputReader
def __iter__
 
def next
 
def from_json
 
def to_json
 
def split_input
 
def validate
 
- Public Member Functions inherited from google.appengine.ext.mapreduce.json_util.JsonMixin
def to_json_str
 
def from_json_str
 

Static Public Attributes

string START_TIME_PARAM = "start_time"
 
string END_TIME_PARAM = "end_time"
 
string MINIMUM_LOG_LEVEL_PARAM = "minimum_log_level"
 
string INCLUDE_INCOMPLETE_PARAM = "include_incomplete"
 
string INCLUDE_APP_LOGS_PARAM = "include_app_logs"
 
string VERSION_IDS_PARAM = "version_ids"
 
string MODULE_VERSIONS_PARAM = "module_versions"
 
- Static Public Attributes inherited from google.appengine.ext.mapreduce.input_readers.InputReader
 expand_parameters = False
 
string NAMESPACE_PARAM = "namespace"
 
string NAMESPACES_PARAM = "namespaces"
 

Detailed Description

Input reader for a time range of logs via the Logs Reader API.

The number of input shards may be specified by the SHARDS_PARAM mapper
parameter.  A starting and ending time (in seconds since the Unix epoch) are
required to generate time ranges over which to shard the input.

Constructor & Destructor Documentation

def google.appengine.ext.mapreduce.input_readers.LogInputReader.__init__ (   self,
  start_time = None,
  end_time = None,
  minimum_log_level = None,
  include_incomplete = False,
  include_app_logs = False,
  version_ids = None,
  module_versions = None,
  kwargs 
)
Constructor.

Args:
  start_time: The earliest request completion or last-update time of logs
that should be mapped over, in seconds since the Unix epoch.
  end_time: The latest request completion or last-update time that logs
should be mapped over, in seconds since the Unix epoch.
  minimum_log_level: An application log level which serves as a filter on
the requests mapped over--requests with no application log at or above
the specified level will be omitted, even if include_app_logs is False.
  include_incomplete: Whether or not to include requests that have started
but not yet finished, as a boolean.  Defaults to False.
  include_app_logs: Whether or not to include application level logs in the
mapped logs, as a boolean.  Defaults to False.
  version_ids: A list of version ids whose logs should be read. This can not
be used with module_versions
  module_versions: A list of tuples containing a module and version id
whose logs should be read. This can not be used with version_ids
  **kwargs: A dictionary of keywords associated with this input reader.

Member Function Documentation

def google.appengine.ext.mapreduce.input_readers.LogInputReader.__iter__ (   self)
Iterates over logs in a given range of time.

Yields:
  A RequestLog containing all the information for a single request.
def google.appengine.ext.mapreduce.input_readers.LogInputReader.__str__ (   self)
Returns the string representation of this LogInputReader.
def google.appengine.ext.mapreduce.input_readers.LogInputReader.from_json (   cls,
  json 
)
Creates an instance of the InputReader for the given input shard's state.

Args:
  json: The InputReader state as a dict-like object.

Returns:
  An instance of the InputReader configured using the given JSON parameters.
def google.appengine.ext.mapreduce.input_readers.LogInputReader.split_input (   cls,
  mapper_spec 
)
Returns a list of input readers for the given input specification.

Args:
  mapper_spec: The MapperSpec for this InputReader.

Returns:
  A list of InputReaders.
def google.appengine.ext.mapreduce.input_readers.LogInputReader.to_json (   self)
Returns an input shard state for the remaining inputs.

Returns:
  A JSON serializable version of the remaining input to read.
def google.appengine.ext.mapreduce.input_readers.LogInputReader.validate (   cls,
  mapper_spec 
)
Validates the mapper's specification and all necessary parameters.

Args:
  mapper_spec: The MapperSpec to be used with this InputReader.

Raises:
  BadReaderParamsError: If the user fails to specify both a starting time
and an ending time, or if the starting time is later than the ending
time.

The documentation for this class was generated from the following file: