Sha256: 99875d02dbc5b8a7b771271952b96ac580122bd6151a0029775c1b68a819f78e
Contents?: true
Size: 661 Bytes
Versions: 13
Compression:
Stored size: 661 Bytes
Contents
module Mandy class HadoopJobFailure < StandardError attr_reader :output def initialize(job, output) @job, @output = job, output end def job_name @job.name end def tracking_url line = @output.split("\n").find {|line| line =~ /Tracking URL/ } return nil unless line line.split('Tracking URL: ').last end def hadoop_error @output end def to_s output = [] output << %(Mandy Job Name: #{job_name}) output << %(Hadoop ERROR: #{hadoop_error}) output << %(Tracking URL: #{tracking_url}) if tracking_url output*"\n" end end end
Version data entries
13 entries across 13 versions & 1 rubygems