Class: ElephantDriver::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/elephant-driver/task.rb

Instance Method Summary collapse

Constructor Details

#initialize(cln, thrift_task) ⇒ Task

Returns a new instance of Task.



6
7
8
9
# File 'lib/elephant-driver/task.rb', line 6

def initialize(cln, thrift_task)
  @cln = cln
  @thrift_task = thrift_task
end

Instance Method Details

#completed?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/elephant-driver/task.rb', line 31

def completed?
  @thrift_task.complete
end

#countersObject



35
36
37
38
39
40
41
42
43
# File 'lib/elephant-driver/task.rb', line 35

def counters
  counters = {}
  @thrift_task.counters.groups.each { |g|
    h = {}
    g.counters.each { |name, c| h[name] = c.value }
    counters[g.name] = h
  }
  counters
end

#exec_finish_timeObject



19
20
21
# File 'lib/elephant-driver/task.rb', line 19

def exec_finish_time
  @thrift_task.execFinishTime
end

#exec_start_timeObject



15
16
17
# File 'lib/elephant-driver/task.rb', line 15

def exec_start_time
  @thrift_task.execStartTime
end

#failed?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/elephant-driver/task.rb', line 27

def failed?
  @thrift_task.failed
end

#progressObject



23
24
25
# File 'lib/elephant-driver/task.rb', line 23

def progress
  @thrift_task.progress
end

#start_timeObject



11
12
13
# File 'lib/elephant-driver/task.rb', line 11

def start_time
  @thrift_task.startTime
end