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 +4 -4
- data/lib/presto/metrics.rb +5 -1
- data/lib/presto/metrics/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c35326d86dc97d75582854dca898b4705c7ce4d
|
4
|
+
data.tar.gz: 8af459261e3979d8527ce36aa85ec89350e0fc60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0722b9ad7961e95e3782df06bc9a6a7e6dc7bcc869845a194fb3afbf7b76a4b1f825c16366b28202219adab174e716b003999418cd754707b05e71c5b5d7d738
|
7
|
+
data.tar.gz: 61b7bc511c7d6b981c0a56202f42d2f913204de8e7c464df95545a9420fbd165b7b29d879ed049e38d584b715ccbd099954123933e148e4a5fd98c3a34cd6d16
|
data/lib/presto/metrics.rb
CHANGED
@@ -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
|