Skip to content

Commit

Permalink
feat: add optional parameters (tarball_gcs_dir, diagnosis_interval, j…
Browse files Browse the repository at this point in the history
…obs, yarn_application_ids) in DiagnoseClusterRequest (#6631)

PiperOrigin-RevId: 565501215
Source-Link: googleapis/googleapis@6b95655
Source-Link: googleapis/googleapis-gen@caf4b28
Copy-Tag: eyJwIjoiRGF0YXByb2MvLk93bEJvdC55YW1sIiwiaCI6ImNhZjRiMjhmNzUyMmVmMjFiY2MwMDZiY2I4YzliNmNkNmQyMjMxYzQifQ==
  • Loading branch information
gcf-owl-bot[bot] authored Sep 15, 2023
1 parent cdb7b09 commit 2df4e91
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 66 deletions.
Binary file modified Dataproc/metadata/V1/Clusters.php
Binary file not shown.
166 changes: 166 additions & 0 deletions Dataproc/src/V1/DiagnoseClusterRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions Dataproc/src/V1/Gapic/ClusterControllerGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
use Google\LongRunning\Operation;
use Google\Protobuf\Duration;
use Google\Protobuf\FieldMask;
use Google\Type\Interval;

/**
* Service Description: The ClusterControllerService provides methods to manage clusters
Expand Down Expand Up @@ -674,6 +675,19 @@ public function deleteCluster($projectId, $region, $clusterName, array $optional
* @param array $optionalArgs {
* Optional.
*
* @type string $tarballGcsDir
* Optional. The output Cloud Storage directory for the diagnostic
* tarball. If not specified, a task-specific directory in the cluster's
* staging bucket will be used.
* @type Interval $diagnosisInterval
* Optional. Time interval in which diagnosis should be carried out on the
* cluster.
* @type string[] $jobs
* Optional. Specifies a list of jobs on which diagnosis is to be performed.
* Format: projects/{project}/regions/{region}/jobs/{job}
* @type string[] $yarnApplicationIds
* Optional. Specifies a list of yarn applications on which diagnosis is to be
* performed.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
Expand All @@ -694,6 +708,22 @@ public function diagnoseCluster($projectId, $region, $clusterName, array $option
$requestParamHeaders['project_id'] = $projectId;
$requestParamHeaders['region'] = $region;
$requestParamHeaders['cluster_name'] = $clusterName;
if (isset($optionalArgs['tarballGcsDir'])) {
$request->setTarballGcsDir($optionalArgs['tarballGcsDir']);
}

if (isset($optionalArgs['diagnosisInterval'])) {
$request->setDiagnosisInterval($optionalArgs['diagnosisInterval']);
}

if (isset($optionalArgs['jobs'])) {
$request->setJobs($optionalArgs['jobs']);
}

if (isset($optionalArgs['yarnApplicationIds'])) {
$request->setYarnApplicationIds($optionalArgs['yarnApplicationIds']);
}

$requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
$optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
return $this->startOperationsCall('DiagnoseCluster', $optionalArgs, $request, $this->getOperationsClient())->wait();
Expand Down
112 changes: 48 additions & 64 deletions Dataproc/src/V1/InstanceGroupConfig.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Dataproc/src/V1/NodeGroup/Role.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2df4e91

Please sign in to comment.