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

New MRS v2 job resource #1327

Merged
merged 2 commits into from
Aug 9, 2021
Merged

New MRS v2 job resource #1327

merged 2 commits into from
Aug 9, 2021

Conversation

Lance52259
Copy link
Contributor

What this PR does / why we need it:
Compared with the job of V1 version, the parameter design of V2 version refers to the console, which makes it more convenient for users to use job resources against the console and integrate old parameters such as jar path into a program parameters dictionary.

Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)
reference: #1324

Special notes for your reviewer:

Release note:

1. New job resource support:
  Seven kinds job: Flink, MapReduce, SparkSubmit, HiveSql, HiveScript, SparkSql and SparkScript.
2. Related document and acc test.

PR Checklist

  • Tests added/passed.
  • Documentation updated.
  • Schema updated.

Acceptance Steps Performed

make testacc TEST='./huaweicloud/services/acceptance/mrs' TESTARGS='-run=TestAccMrsMapReduceJob_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/mrs -v -run=TestAccMrsMapReduceJob_basic -timeout 360m -parallel 4
=== RUN   TestAccMrsMapReduceJob_basic
=== PAUSE TestAccMrsMapReduceJob_basic
=== CONT  TestAccMrsMapReduceJob_basic
--- PASS: TestAccMrsMapReduceJob_basic (70.14s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/mrs       70.215s

Required: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{
"Flink", "HiveSql", "HiveScript", "MapReduce", "SparkSubmit", "SparkSql", "SparkScript",
Copy link
Collaborator

Choose a reason for hiding this comment

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

defined as a constant, it is more convenient to use, such as in test : resource.TestCheckResourceAttr(resourceName, "type", "SparkSubmit"),


-> **NOTE:** Spark and Hive jobs can be added to only clusters including Spark and Hive components.

* `jar_path` - (Optional, String, ForceNew) Specifies the .jar package path for program execution.
Copy link
Collaborator

Choose a reason for hiding this comment

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

when type =sparkSubmit
in the console webpage : this field label is "Program Path", support .jar or .py

- use constant to defind the job type
- adjust document description
- use program path to replace the jar path parameter
@ShiChangkuo ShiChangkuo merged commit 5442bb5 into huaweicloud:master Aug 9, 2021
@Lance52259 Lance52259 deleted the br_mrs_job_active branch August 31, 2021 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants