-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[Synapse] - Enhance SparkBatchOperation polling logic to support both job submission and job execution scenarios and fix SparkSessionOperation and SparkStatementOperation #23706
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
Merged
idear1203
merged 14 commits into
Azure:main
from
idear1203:synapse_fix_polling_logic_for_spark
Sep 30, 2021
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ad088c8
[Synapse] - SparkBatchOperation should not return when state is starting
9212275
Support both job submission and job execution scenarios
44d4ea7
Update export api
2eb3ce9
Fix a few comments
9f0f0c6
Save current status
8b404f8
Add test cases
a051709
Add file comment
12ca497
Refresh session records
450e85f
Resolve conflicts
a53bc2c
update exported API
94447a4
Regenerate code
b21177a
Update session records
268038f
Add public constructors for operations
c4e19d1
Update Azure.Analytics.Synapse.Spark.netstandard2.0
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 62 additions & 6 deletions
68
...synapse/Azure.Analytics.Synapse.Spark/api/Azure.Analytics.Synapse.Spark.netstandard2.0.cs
Large diffs are not rendered by default.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
sdk/synapse/Azure.Analytics.Synapse.Spark/src/Customization/Models/SparkBatchJobOptions.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System; | ||
|
|
||
| namespace Azure.Analytics.Synapse.Spark.Models | ||
| { | ||
| /// <summary> The SparkBatchJobOptions. </summary> | ||
| public partial class SparkBatchJobOptions | ||
| { | ||
| /// <summary> Initializes a new instance of SparkBatchJobOptions. </summary> | ||
| /// <param name="name"></param> | ||
| /// <param name="file"></param> | ||
| /// <param name="creationCompletionType"></param> | ||
| /// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="file"/> is null. </exception> | ||
| public SparkBatchJobOptions(string name, string file, SparkBatchOperationCompletionType creationCompletionType = SparkBatchOperationCompletionType.JobSubmission) : this(name, file) | ||
| { | ||
| CreationCompletionType = creationCompletionType; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Describes the different ways of Spark batch job operation could complete. | ||
| /// If <see cref="SparkBatchOperationCompletionType.JobSubmission"/> is used, the operation will be considered as complete when Livy state is starting/running/error/dead/success/killed. | ||
| /// If <see cref="SparkBatchOperationCompletionType.JobExecution"/> is used, the operation will be considered as complete when Livy state is error/dead/success/killed. | ||
| /// </summary> | ||
| public SparkBatchOperationCompletionType CreationCompletionType { get; set; } | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
...ure.Analytics.Synapse.Spark/src/Customization/Models/SparkBatchOperationCompletionType.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Azure.Analytics.Synapse.Spark.Models | ||
| { | ||
| /// <summary> | ||
| /// Describes the different ways of Spark batch job operation could complete. | ||
| /// If <see cref="JobSubmission"/> is used, the operation will be considered as complete when Livy state is starting/running/error/dead/success/killed. | ||
| /// If <see cref="JobExecution"/> is used, the operation will be considered as complete when Livy state is error/dead/success/killed. | ||
| /// </summary> | ||
| public enum SparkBatchOperationCompletionType | ||
| { | ||
| JobSubmission, | ||
| JobExecution | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Models/LivyStatementStates.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.