presto-metrics 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8e484d67a52b36a5a044eb52ebdcdeba4c30ca6
4
- data.tar.gz: c525e4c9a6fa494b786aac4d917af62ad3bb2ac0
3
+ metadata.gz: 6c35326d86dc97d75582854dca898b4705c7ce4d
4
+ data.tar.gz: 8af459261e3979d8527ce36aa85ec89350e0fc60
5
5
  SHA512:
6
- metadata.gz: f9436d3e9e34d5016f8fdf129a4176792509b34731e54bcef4d7dfff0e9547e86674a8885b7a9a5b7707060a0b7d7c8739b4b8b5cf5b7beed4c28e29fa78ee35
7
- data.tar.gz: a91b72cf149f578b668689a4c17fceed21f596516c6278f360a3b54acffac62a374c6c4984f51e894050917bbc10e7e67132decdacf9e0a5fe3409cd71d3950f
6
+ metadata.gz: 0722b9ad7961e95e3782df06bc9a6a7e6dc7bcc869845a194fb3afbf7b76a4b1f825c16366b28202219adab174e716b003999418cd754707b05e71c5b5d7d738
7
+ data.tar.gz: 61b7bc511c7d6b981c0a56202f42d2f913204de8e7c464df95545a9420fbd165b7b29d879ed049e38d584b715ccbd099954123933e148e4a5fd98c3a34cd6d16
@@ -22,7 +22,7 @@ module Presto
22
22
  end
23
23
 
24
24
  def find(id)
25
- @client.get_query_json(id)
25
+ JSON.parse(@client.get_query_json(id))
26
26
  end
27
27
 
28
28
  def query_list(path="")
@@ -41,6 +41,10 @@ module Presto
41
41
  h['completed_drivers'] = qi['completedDrivers'] || 0
42
42
  h['total_drivers'] = qi['totalDrivers'] || 0
43
43
  h['elapsed_time'] = qi['elapsedTime'] || "0.0m"
44
+ h['create_time'] = qi['createTime']
45
+ if(h['state'] == "FAILED")
46
+ h['errorCode'] = find(h['query_id'])['errorCode'] || {}
47
+ end
44
48
  h
45
49
  }
46
50
  end
@@ -1,5 +1,5 @@
1
1
  module Presto
2
2
  module Metrics
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: presto-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taro L. Saito