Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
chore: updated docs and code sturcture for Dataproc metric configurat…
Browse files Browse the repository at this point in the history
…ion (#922)

* feat: add support for Dataproc metric configuration

Committer: @AkshatBhargava
PiperOrigin-RevId: 475750057

Source-Link: googleapis/googleapis@30517fd

Source-Link: https://github.com/googleapis/googleapis-gen/commit/a41cc2ab3df78ee0b84f67499e7562de02ab34c0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTQxY2MyYWIzZGY3OGVlMGI4NGY2NzQ5OWU3NTYyZGUwMmFiMzRjMCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: updated docs and code sturcture for Dataproc metric configuration

Committer: @akshatbhargava123
PiperOrigin-RevId: 477101789

Source-Link: googleapis/googleapis@2e19de1

Source-Link: https://github.com/googleapis/googleapis-gen/commit/c12032a59778fdd173d4cfe82c472c0596043865
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzEyMDMyYTU5Nzc4ZmRkMTczZDRjZmU4MmM0NzJjMDU5NjA0Mzg2NSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Sep 27, 2022
1 parent ee2ca47 commit 5a6f72e
Show file tree
Hide file tree
Showing 6 changed files with 3,486 additions and 247 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,23 @@ private ClusterConfig(
metastoreConfig_ = subBuilder.buildPartial();
}

break;
}
case 186:
{
com.google.cloud.dataproc.v1.DataprocMetricConfig.Builder subBuilder = null;
if (dataprocMetricConfig_ != null) {
subBuilder = dataprocMetricConfig_.toBuilder();
}
dataprocMetricConfig_ =
input.readMessage(
com.google.cloud.dataproc.v1.DataprocMetricConfig.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(dataprocMetricConfig_);
dataprocMetricConfig_ = subBuilder.buildPartial();
}

break;
}
default:
Expand Down Expand Up @@ -1205,6 +1222,61 @@ public com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder getMetastoreConfigO
return getMetastoreConfig();
}

public static final int DATAPROC_METRIC_CONFIG_FIELD_NUMBER = 23;
private com.google.cloud.dataproc.v1.DataprocMetricConfig dataprocMetricConfig_;
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @return Whether the dataprocMetricConfig field is set.
*/
@java.lang.Override
public boolean hasDataprocMetricConfig() {
return dataprocMetricConfig_ != null;
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @return The dataprocMetricConfig.
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.DataprocMetricConfig getDataprocMetricConfig() {
return dataprocMetricConfig_ == null
? com.google.cloud.dataproc.v1.DataprocMetricConfig.getDefaultInstance()
: dataprocMetricConfig_;
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.DataprocMetricConfigOrBuilder
getDataprocMetricConfigOrBuilder() {
return getDataprocMetricConfig();
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand Down Expand Up @@ -1261,6 +1333,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (metastoreConfig_ != null) {
output.writeMessage(20, getMetastoreConfig());
}
if (dataprocMetricConfig_ != null) {
output.writeMessage(23, getDataprocMetricConfig());
}
unknownFields.writeTo(output);
}

Expand Down Expand Up @@ -1315,6 +1390,10 @@ public int getSerializedSize() {
if (metastoreConfig_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getMetastoreConfig());
}
if (dataprocMetricConfig_ != null) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(23, getDataprocMetricConfig());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
Expand Down Expand Up @@ -1378,6 +1457,10 @@ public boolean equals(final java.lang.Object obj) {
if (hasMetastoreConfig()) {
if (!getMetastoreConfig().equals(other.getMetastoreConfig())) return false;
}
if (hasDataprocMetricConfig() != other.hasDataprocMetricConfig()) return false;
if (hasDataprocMetricConfig()) {
if (!getDataprocMetricConfig().equals(other.getDataprocMetricConfig())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
Expand Down Expand Up @@ -1441,6 +1524,10 @@ public int hashCode() {
hash = (37 * hash) + METASTORE_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getMetastoreConfig().hashCode();
}
if (hasDataprocMetricConfig()) {
hash = (37 * hash) + DATAPROC_METRIC_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getDataprocMetricConfig().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
Expand Down Expand Up @@ -1664,6 +1751,12 @@ public Builder clear() {
metastoreConfig_ = null;
metastoreConfigBuilder_ = null;
}
if (dataprocMetricConfigBuilder_ == null) {
dataprocMetricConfig_ = null;
} else {
dataprocMetricConfig_ = null;
dataprocMetricConfigBuilder_ = null;
}
return this;
}

Expand Down Expand Up @@ -1758,6 +1851,11 @@ public com.google.cloud.dataproc.v1.ClusterConfig buildPartial() {
} else {
result.metastoreConfig_ = metastoreConfigBuilder_.build();
}
if (dataprocMetricConfigBuilder_ == null) {
result.dataprocMetricConfig_ = dataprocMetricConfig_;
} else {
result.dataprocMetricConfig_ = dataprocMetricConfigBuilder_.build();
}
onBuilt();
return result;
}
Expand Down Expand Up @@ -1875,6 +1973,9 @@ public Builder mergeFrom(com.google.cloud.dataproc.v1.ClusterConfig other) {
if (other.hasMetastoreConfig()) {
mergeMetastoreConfig(other.getMetastoreConfig());
}
if (other.hasDataprocMetricConfig()) {
mergeDataprocMetricConfig(other.getDataprocMetricConfig());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
Expand Down Expand Up @@ -5121,6 +5222,214 @@ public com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder getMetastoreConfigO
return metastoreConfigBuilder_;
}

private com.google.cloud.dataproc.v1.DataprocMetricConfig dataprocMetricConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.DataprocMetricConfig,
com.google.cloud.dataproc.v1.DataprocMetricConfig.Builder,
com.google.cloud.dataproc.v1.DataprocMetricConfigOrBuilder>
dataprocMetricConfigBuilder_;
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @return Whether the dataprocMetricConfig field is set.
*/
public boolean hasDataprocMetricConfig() {
return dataprocMetricConfigBuilder_ != null || dataprocMetricConfig_ != null;
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @return The dataprocMetricConfig.
*/
public com.google.cloud.dataproc.v1.DataprocMetricConfig getDataprocMetricConfig() {
if (dataprocMetricConfigBuilder_ == null) {
return dataprocMetricConfig_ == null
? com.google.cloud.dataproc.v1.DataprocMetricConfig.getDefaultInstance()
: dataprocMetricConfig_;
} else {
return dataprocMetricConfigBuilder_.getMessage();
}
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*/
public Builder setDataprocMetricConfig(
com.google.cloud.dataproc.v1.DataprocMetricConfig value) {
if (dataprocMetricConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
dataprocMetricConfig_ = value;
onChanged();
} else {
dataprocMetricConfigBuilder_.setMessage(value);
}

return this;
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*/
public Builder setDataprocMetricConfig(
com.google.cloud.dataproc.v1.DataprocMetricConfig.Builder builderForValue) {
if (dataprocMetricConfigBuilder_ == null) {
dataprocMetricConfig_ = builderForValue.build();
onChanged();
} else {
dataprocMetricConfigBuilder_.setMessage(builderForValue.build());
}

return this;
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*/
public Builder mergeDataprocMetricConfig(
com.google.cloud.dataproc.v1.DataprocMetricConfig value) {
if (dataprocMetricConfigBuilder_ == null) {
if (dataprocMetricConfig_ != null) {
dataprocMetricConfig_ =
com.google.cloud.dataproc.v1.DataprocMetricConfig.newBuilder(dataprocMetricConfig_)
.mergeFrom(value)
.buildPartial();
} else {
dataprocMetricConfig_ = value;
}
onChanged();
} else {
dataprocMetricConfigBuilder_.mergeFrom(value);
}

return this;
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*/
public Builder clearDataprocMetricConfig() {
if (dataprocMetricConfigBuilder_ == null) {
dataprocMetricConfig_ = null;
onChanged();
} else {
dataprocMetricConfig_ = null;
dataprocMetricConfigBuilder_ = null;
}

return this;
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*/
public com.google.cloud.dataproc.v1.DataprocMetricConfig.Builder
getDataprocMetricConfigBuilder() {

onChanged();
return getDataprocMetricConfigFieldBuilder().getBuilder();
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*/
public com.google.cloud.dataproc.v1.DataprocMetricConfigOrBuilder
getDataprocMetricConfigOrBuilder() {
if (dataprocMetricConfigBuilder_ != null) {
return dataprocMetricConfigBuilder_.getMessageOrBuilder();
} else {
return dataprocMetricConfig_ == null
? com.google.cloud.dataproc.v1.DataprocMetricConfig.getDefaultInstance()
: dataprocMetricConfig_;
}
}
/**
*
*
* <pre>
* Optional. The config for Dataproc metrics.
* </pre>
*
* <code>
* .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.DataprocMetricConfig,
com.google.cloud.dataproc.v1.DataprocMetricConfig.Builder,
com.google.cloud.dataproc.v1.DataprocMetricConfigOrBuilder>
getDataprocMetricConfigFieldBuilder() {
if (dataprocMetricConfigBuilder_ == null) {
dataprocMetricConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.DataprocMetricConfig,
com.google.cloud.dataproc.v1.DataprocMetricConfig.Builder,
com.google.cloud.dataproc.v1.DataprocMetricConfigOrBuilder>(
getDataprocMetricConfig(), getParentForChildren(), isClean());
dataprocMetricConfig_ = null;
}
return dataprocMetricConfigBuilder_;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Loading

0 comments on commit 5a6f72e

Please sign in to comment.