Skip to content

Commit 2999dc1

Browse files
idear1203Dongwei Wang
authored andcommitted
[Synapse] - Use data plane API to retrieve Spark pool Resource Info (#14627)
Co-authored-by: Dongwei Wang <[email protected]>
1 parent 8e89d7b commit 2999dc1

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/Synapse/Synapse/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
## Upcoming Release
2121
* Renamed -AllowAllAzureIP to -AllowAllAzureIp and changed IP range to 0.0.0.0-0.0.0.0
2222
* Added -AllowAllIp and set IP range to 0.0.0.0-255.255.255.255
23+
* Fixed the issue of retrieving Apache Spark pool information through management API
2324

2425
## Version 0.9.0
2526
* Added support for workspace key encryption management

src/Synapse/Synapse/Commands/DataPlaneCommands/Artifact/Notebooks/SetAzureSynapseNotebook.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public override void ExecuteCmdlet()
9898

9999
string suffix = DefaultContext.Environment.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix);
100100
string endpoint = "https://" + this.WorkspaceName + "." + suffix;
101-
var sparkPoolInfo = new SynapseAnalyticsManagementClient(DefaultContext).GetSparkPool(null, this.WorkspaceName, this.SparkPoolName);
101+
var sparkPoolInfo = SynapseAnalyticsClient.GetBigDataPool(SparkPoolName);
102102

103103
options["auth"] = new ComputeOptions
104104
{

src/Synapse/Synapse/Models/SynapseAnalyticsArtifactsClient.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class SynapseAnalyticsArtifactsClient
2222
private readonly TriggerRunClient _triggerRunClient;
2323
private readonly DatasetClient _datasetClient;
2424
private readonly DataFlowClient _dataFlowClient;
25+
private readonly BigDataPoolsClient _bigDataPoolsClient;
2526

2627
public SynapseAnalyticsArtifactsClient(string workspaceName, IAzureContext context)
2728
{
@@ -40,6 +41,7 @@ public SynapseAnalyticsArtifactsClient(string workspaceName, IAzureContext conte
4041
_triggerRunClient = new TriggerRunClient(uri, new AzureSessionCredential(context));
4142
_datasetClient = new DatasetClient(uri, new AzureSessionCredential(context));
4243
_dataFlowClient = new DataFlowClient(uri, new AzureSessionCredential(context));
44+
_bigDataPoolsClient = new BigDataPoolsClient(uri, new AzureSessionCredential(context));
4345
}
4446

4547
#region pipeline
@@ -257,6 +259,15 @@ public void DeleteDataFlow(string dataFlowName)
257259

258260
#endregion
259261

262+
#region BigDataPools
263+
264+
public BigDataPoolResourceInfo GetBigDataPool(string bigDataPoolName)
265+
{
266+
return _bigDataPoolsClient.Get(bigDataPoolName);
267+
}
268+
269+
#endregion
270+
260271
#region helpers
261272

262273
public virtual string ReadJsonFileContent(string path)

0 commit comments

Comments
 (0)