module ContainedMr::RunnerLogic
Logic shared by {ContainedMr::Runner} and {ContainedMr::Mock::Runner}.
Attributes
@return {String} the unique ID of the Docker container used to run the
mapper / reducer; this is nil
@return {Time} the time when the mapper or reducer stops running or is killed
@return {String} the contents of the file
@return {Time} the time when the mapper or reducer starts running
@return {Number} the time
@return {String} the data written by the mapper or reducer to stderr
@return {String} the data written by the mapper or reducer to stdout
@return {Boolean} true if the mapper or reducer was terminated due to
running for too long
Public Instance Methods
The information written to the mapper status files given to the reducer.
This is saved in files named 1.json, 2.json, … provided to the reducer.
@return {Hash<Symbol, Object>} JSON-compatible representation of the
runner's information
# File lib/contained_mr/runner_logic.rb, line 35 def json_file { ran_for: ran_for, exit_code: status_code, timed_out: timed_out } end
@return {Number} the container’s running time, in seconds
# File lib/contained_mr/runner_logic.rb, line 25 def ran_for started_at && ended_at && (ended_at - started_at) end