Method: ContainedMr::Runner#initialize

Defined in:
lib/contained_mr/runner.rb

#initialize(container_options, time_limit, output_path) ⇒ Runner

Initialize a runner.

Parameters:

  • container_options (Hash<String, Object>)

    docker container creation options, passed to Docker::Container.create without modification

  • time_limit (Number)

    maximum number of seconds that the runner’s container is allowed to execute before being terminated

  • output_path (String)

    the location of the file inside the container whose output will be saved



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/contained_mr/runner.rb', line 18

def initialize(container_options, time_limit, output_path)
  @_container_options = container_options
  @_time_limit = time_limit
  @_output_path = output_path

  @container_id = nil
  @started_at = @ended_at = nil
  @status_code = nil
  @timed_out = nil
  @stdout = @stderr = nil
  @output = nil
end