tiny-presto 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tiny-presto.rb +8 -4
- data/lib/tiny-presto/cluster.rb +1 -0
- data/lib/tiny-presto/version.rb +1 -1
- data/spec/version_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9450ad107fdacbc74c5bb6701fe14dffeedeea73271c482f9215c34560feea9
|
|
4
|
+
data.tar.gz: edf1b44fcf2e83f231e7e98f9162e87518397f0b31dd5d6cf8ddc2dc517d62cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c8b3d5ad1609dc68e8a5b5149d3381ffb103b0ef9aa6ac286eae9b0ff639b371ffa10ecd2734709e8710dcf43d62344548556f36d66d37bc2247b9d3e9339f70
|
|
7
|
+
data.tar.gz: 64ab5b8eb78343a27d94097ff4a841b6855b8bb7a90ef6e79aecc87e2438c54e5998df5660ac45c0b65ffd426f21116376c6a4f91f3f0d927bd60a464c061384
|
data/lib/tiny-presto.rb
CHANGED
|
@@ -74,6 +74,9 @@ module TinyPresto
|
|
|
74
74
|
rows
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
+
RETRYABLE_ERRORS = [
|
|
78
|
+
/No nodes available to run query/
|
|
79
|
+
]
|
|
77
80
|
# Run the given query with retrying in case of undeterministic error.
|
|
78
81
|
#
|
|
79
82
|
# TinyPresto.run_with_retry("show schemas")
|
|
@@ -83,10 +86,11 @@ module TinyPresto
|
|
|
83
86
|
return run(sql)
|
|
84
87
|
rescue Presto::Client::PrestoQueryError => e
|
|
85
88
|
# Cluster may be in the initialization phase.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
if RETRYABLE_ERRORS.any? { |err| e.message =~ err }
|
|
90
|
+
sleep(1)
|
|
91
|
+
next
|
|
92
|
+
end
|
|
93
|
+
raise
|
|
90
94
|
end
|
|
91
95
|
end
|
|
92
96
|
|
data/lib/tiny-presto/cluster.rb
CHANGED
data/lib/tiny-presto/version.rb
CHANGED
data/spec/version_spec.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tiny-presto
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kai Sasaki
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-02-
|
|
11
|
+
date: 2020-02-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: docker-api
|