google-cloud-dataproc 1.1.0 → 1.1.1
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/MIGRATING.md +52 -1
- data/lib/google/cloud/dataproc/version.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: ec0383e9af4e2ae871bcd10490149741e39c5407113b7ae613f9a43bd80f3fcb
|
4
|
+
data.tar.gz: 2b0101a2d521cc9a15af428908b3ecc0acc072b791878b57b7670dd278b0b013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d642b1169e3edadbc3b19eb2453fc69b0fa720694079a25317acd7a6df1367b3add424e41d14ba40dcbf395fde6a0a99646b6bf9c41b9b8da6839db0e1c9156
|
7
|
+
data.tar.gz: d113a8e467db3c44067b0b69f7818b302ea9f5856fa3c9da099da5792f49af99f9d01ebbfa06e6b6af0f5dd20201c453f063e9a16c135a749bbb54f2bbf84dbe
|
data/MIGRATING.md
CHANGED
@@ -29,6 +29,10 @@ To summarize:
|
|
29
29
|
resource paths. These paths are now instance methods on the client objects,
|
30
30
|
and are also available in a separate paths module. See
|
31
31
|
[Resource Path Helpers](#resource-path-helpers) for more info.
|
32
|
+
* Previously, clients reported RPC errors by raising instances of
|
33
|
+
`Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
|
34
|
+
`Google::Cloud::Error` and its subclasses. See
|
35
|
+
[Handling Errors](#handling-errors) for more info.
|
32
36
|
* Some classes have moved into different namespaces. See
|
33
37
|
[Class Namespaces](#class-namespaces) for more info.
|
34
38
|
|
@@ -274,7 +278,7 @@ Finally, in the 1.0 client, you can also use the paths module as a convenience m
|
|
274
278
|
|
275
279
|
New:
|
276
280
|
```
|
277
|
-
# Bring the
|
281
|
+
# Bring the path helper methods into the current class
|
278
282
|
include Google::Cloud::Dataproc::V1::WorkflowTemplateService::Paths
|
279
283
|
|
280
284
|
def foo
|
@@ -291,6 +295,53 @@ def foo
|
|
291
295
|
end
|
292
296
|
```
|
293
297
|
|
298
|
+
### Handling Errors
|
299
|
+
|
300
|
+
The client reports standard
|
301
|
+
[gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
|
302
|
+
by raising exceptions. In older releases, these exceptions were located in the
|
303
|
+
`Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
|
304
|
+
exception class, defined in the `google-gax` gem. However, these classes were
|
305
|
+
different from the standard exceptions (subclasses of `Google::Cloud::Error`)
|
306
|
+
thrown by other client libraries such as `google-cloud-storage`.
|
307
|
+
|
308
|
+
The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
|
309
|
+
for consistency across all the Google Cloud client libraries. In general, these
|
310
|
+
exceptions have the same name as their counterparts from older releases, but
|
311
|
+
are located in the `Google::Cloud` namespace rather than the `Google::Gax`
|
312
|
+
namespace.
|
313
|
+
|
314
|
+
Old:
|
315
|
+
```
|
316
|
+
client = Google::Cloud::Dataproc::ClusterController.new
|
317
|
+
|
318
|
+
project_id = "my-project"
|
319
|
+
region = "us-central1"
|
320
|
+
cluster_name = "my_cluster"
|
321
|
+
|
322
|
+
begin
|
323
|
+
response = client.get_cluster project_id, region, cluster_name
|
324
|
+
rescue Google::Gax::Error => e
|
325
|
+
# Handle exceptions that subclass Google::Gax::Error
|
326
|
+
end
|
327
|
+
```
|
328
|
+
|
329
|
+
New:
|
330
|
+
```
|
331
|
+
client = Google::Cloud::Dataproc.cluster_controller
|
332
|
+
|
333
|
+
project_id = "my-project"
|
334
|
+
region = "us-central1"
|
335
|
+
cluster_name = "my_cluster"
|
336
|
+
|
337
|
+
begin
|
338
|
+
response = client.get_cluster project_id: project_id, region: region,
|
339
|
+
cluster_name: cluster_name
|
340
|
+
rescue Google::Cloud::Error => e
|
341
|
+
# Handle exceptions that subclass Google::Cloud::Error
|
342
|
+
end
|
343
|
+
```
|
344
|
+
|
294
345
|
### Class Namespaces
|
295
346
|
|
296
347
|
In older releases, the client object was of classes with names like:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-dataproc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|