Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dataproc quickstart and createcluster #1908

Merged
merged 29 commits into from
Dec 30, 2019
Merged

feat: dataproc quickstart and createcluster #1908

merged 29 commits into from
Dec 30, 2019

Conversation

bradmiro
Copy link
Contributor

  • adding quickstart sample + test
  • updating createCluster + test
  • updating pom

@bradmiro bradmiro requested a review from a team December 26, 2019 18:52
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 26, 2019
dataproc/src/main/java/Quickstart.java Show resolved Hide resolved
dataproc/src/test/java/CreateClusterTest.java Outdated Show resolved Hide resolved
dataproc/src/test/java/CreateClusterTest.java Outdated Show resolved Hide resolved
dataproc/src/test/java/CreateClusterTest.java Show resolved Hide resolved
@bradmiro bradmiro requested a review from kurtisvg December 27, 2019 23:17
Copy link
Contributor

@kurtisvg kurtisvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of nits - PTAL

dataproc/pom.xml Outdated Show resolved Hide resolved
dataproc/pom.xml Show resolved Hide resolved
deleteClusterAsyncRequest.get();
System.out.println(String.format("Cluster \"%s\" successfully deleted.", clusterName));

} catch (ExecutionException e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If ExecutionException occurs from interacting with the API (like it's thrown if you don't have permission or if your request is misconfigured), keep it and clarify that it's an error from interacting with the service with the println.

If it's not from the API, please let it bubble up (and be consistent with the other samples - it's bubbled up in a few other places).

Copy link
Contributor Author

@bradmiro bradmiro Dec 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yes, I see what you're saying. Errors caused by our API bubble up to be an Execution Exception, so I think it should definitely be caught. I'll add it to the other sample.

@kurtisvg
Copy link
Contributor

You may also need to truncate your UUID:

INVALID_ARGUMENT: Cluster name 'java-dataproc-create-cluster-test-facb5e75-2e17-486c-9e22-e108bf8e8e63' must match pattern (?:[a-z](?:[-a-z0-9]{0,49}[a-z0-9]

@bradmiro bradmiro merged commit 287de72 into master Dec 30, 2019
@bradmiro bradmiro deleted the dataproc-samples branch December 30, 2019 21:51
bourgeoisor pushed a commit that referenced this pull request Nov 11, 2022
* Added dataproc quickstart samples

* Fixed linting, string formatting, copyrights

* added overloaded functions to all samples

* Formatting changes

* small bug fixes

* Fixed CreateCluster sample and added Quickstart

* Added quickstart sample

* Added dataproc quickstart samples

* Fixed linting, string formatting, copyrights

* added overloaded functions to all samples

* Formatting changes

* small bug fixes

* Fixed CreateCluster sample and added Quickstart

* Added quickstart sample

* Updates to createCluster and quickstart

* Fixed quickstart and tests

* Changes to tests

* Added periods to comments

* Fixed pom and added handling for ExecutionException

* Fixed lint errors

* Fixed linting errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants