Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dataproc/v1/jobs.proto
package com.google.cloud.dataproc.v1;
/**
*
*
*
* A Dataproc job for running [Apache Hive](https://hive.apache.org/)
* queries on YARN.
*
*
* Protobuf type {@code google.cloud.dataproc.v1.HiveJob}
*/
public final class HiveJob extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.HiveJob)
HiveJobOrBuilder {
private static final long serialVersionUID = 0L;
// Use HiveJob.newBuilder() to construct.
private HiveJob(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private HiveJob() {
jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new HiveJob();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private HiveJob(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();
queriesCase_ = 1;
queries_ = s;
break;
}
case 18:
{
com.google.cloud.dataproc.v1.QueryList.Builder subBuilder = null;
if (queriesCase_ == 2) {
subBuilder = ((com.google.cloud.dataproc.v1.QueryList) queries_).toBuilder();
}
queries_ =
input.readMessage(
com.google.cloud.dataproc.v1.QueryList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dataproc.v1.QueryList) queries_);
queries_ = subBuilder.buildPartial();
}
queriesCase_ = 2;
break;
}
case 24:
{
continueOnFailure_ = input.readBool();
break;
}
case 34:
{
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
scriptVariables_ =
com.google.protobuf.MapField.newMapField(
ScriptVariablesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry scriptVariables__ =
input.readMessage(
ScriptVariablesDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
scriptVariables_
.getMutableMap()
.put(scriptVariables__.getKey(), scriptVariables__.getValue());
break;
}
case 42:
{
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
properties_ =
com.google.protobuf.MapField.newMapField(
PropertiesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry properties__ =
input.readMessage(
PropertiesDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
properties_.getMutableMap().put(properties__.getKey(), properties__.getValue());
break;
}
case 50:
{
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
jarFileUris_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
jarFileUris_.add(s);
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) != 0)) {
jarFileUris_ = jarFileUris_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataproc.v1.JobsProto
.internal_static_google_cloud_dataproc_v1_HiveJob_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(int number) {
switch (number) {
case 4:
return internalGetScriptVariables();
case 5:
return internalGetProperties();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataproc.v1.JobsProto
.internal_static_google_cloud_dataproc_v1_HiveJob_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataproc.v1.HiveJob.class,
com.google.cloud.dataproc.v1.HiveJob.Builder.class);
}
private int queriesCase_ = 0;
private java.lang.Object queries_;
public enum QueriesCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
QUERY_FILE_URI(1),
QUERY_LIST(2),
QUERIES_NOT_SET(0);
private final int value;
private QueriesCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static QueriesCase valueOf(int value) {
return forNumber(value);
}
public static QueriesCase forNumber(int value) {
switch (value) {
case 1:
return QUERY_FILE_URI;
case 2:
return QUERY_LIST;
case 0:
return QUERIES_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public QueriesCase getQueriesCase() {
return QueriesCase.forNumber(queriesCase_);
}
public static final int QUERY_FILE_URI_FIELD_NUMBER = 1;
/**
*
*
*
* The HCFS URI of the script that contains Hive queries.
*
*
* .google.cloud.dataproc.v1.QueryList query_list = 2;
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder() {
if (queriesCase_ == 2) {
return (com.google.cloud.dataproc.v1.QueryList) queries_;
}
return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance();
}
public static final int CONTINUE_ON_FAILURE_FIELD_NUMBER = 3;
private boolean continueOnFailure_;
/**
*
*
*
* Optional. Whether to continue executing queries if a query fails.
* The default value is `false`. Setting to `true` can be useful when
* executing independent parallel queries.
*
*
* bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The continueOnFailure.
*/
@java.lang.Override
public boolean getContinueOnFailure() {
return continueOnFailure_;
}
public static final int SCRIPT_VARIABLES_FIELD_NUMBER = 4;
private static final class ScriptVariablesDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.cloud.dataproc.v1.JobsProto
.internal_static_google_cloud_dataproc_v1_HiveJob_ScriptVariablesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField scriptVariables_;
private com.google.protobuf.MapField
internalGetScriptVariables() {
if (scriptVariables_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ScriptVariablesDefaultEntryHolder.defaultEntry);
}
return scriptVariables_;
}
public int getScriptVariablesCount() {
return internalGetScriptVariables().getMap().size();
}
/**
*
*
*
* Optional. Mapping of query variable names to values (equivalent to the
* Hive command: `SET name="value";`).
*
*
* map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public boolean containsScriptVariables(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
return internalGetScriptVariables().getMap().containsKey(key);
}
/** Use {@link #getScriptVariablesMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getScriptVariables() {
return getScriptVariablesMap();
}
/**
*
*
*
* Optional. Mapping of query variable names to values (equivalent to the
* Hive command: `SET name="value";`).
*
* Optional. Mapping of query variable names to values (equivalent to the
* Hive command: `SET name="value";`).
*
*
* map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.lang.String getScriptVariablesOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
java.util.Map map = internalGetScriptVariables().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int PROPERTIES_FIELD_NUMBER = 5;
private static final class PropertiesDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.cloud.dataproc.v1.JobsProto
.internal_static_google_cloud_dataproc_v1_HiveJob_PropertiesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField properties_;
private com.google.protobuf.MapField internalGetProperties() {
if (properties_ == null) {
return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry);
}
return properties_;
}
public int getPropertiesCount() {
return internalGetProperties().getMap().size();
}
/**
*
*
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
*
* map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public boolean containsProperties(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
return internalGetProperties().getMap().containsKey(key);
}
/** Use {@link #getPropertiesMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getProperties() {
return getPropertiesMap();
}
/**
*
*
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
*
* map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.lang.String getPropertiesOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
java.util.Map map = internalGetProperties().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int JAR_FILE_URIS_FIELD_NUMBER = 6;
private com.google.protobuf.LazyStringList jarFileUris_;
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the jarFileUris.
*/
public com.google.protobuf.ProtocolStringList getJarFileUrisList() {
return jarFileUris_;
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of jarFileUris.
*/
public int getJarFileUrisCount() {
return jarFileUris_.size();
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The jarFileUris at the given index.
*/
public java.lang.String getJarFileUris(int index) {
return jarFileUris_.get(index);
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the jarFileUris at the given index.
*/
public com.google.protobuf.ByteString getJarFileUrisBytes(int index) {
return jarFileUris_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (queriesCase_ == 1) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queries_);
}
if (queriesCase_ == 2) {
output.writeMessage(2, (com.google.cloud.dataproc.v1.QueryList) queries_);
}
if (continueOnFailure_ != false) {
output.writeBool(3, continueOnFailure_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetScriptVariables(), ScriptVariablesDefaultEntryHolder.defaultEntry, 4);
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 5);
for (int i = 0; i < jarFileUris_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, jarFileUris_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (queriesCase_ == 1) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queries_);
}
if (queriesCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
2, (com.google.cloud.dataproc.v1.QueryList) queries_);
}
if (continueOnFailure_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, continueOnFailure_);
}
for (java.util.Map.Entry entry :
internalGetScriptVariables().getMap().entrySet()) {
com.google.protobuf.MapEntry scriptVariables__ =
ScriptVariablesDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, scriptVariables__);
}
for (java.util.Map.Entry entry :
internalGetProperties().getMap().entrySet()) {
com.google.protobuf.MapEntry properties__ =
PropertiesDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, properties__);
}
{
int dataSize = 0;
for (int i = 0; i < jarFileUris_.size(); i++) {
dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i));
}
size += dataSize;
size += 1 * getJarFileUrisList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dataproc.v1.HiveJob)) {
return super.equals(obj);
}
com.google.cloud.dataproc.v1.HiveJob other = (com.google.cloud.dataproc.v1.HiveJob) obj;
if (getContinueOnFailure() != other.getContinueOnFailure()) return false;
if (!internalGetScriptVariables().equals(other.internalGetScriptVariables())) return false;
if (!internalGetProperties().equals(other.internalGetProperties())) return false;
if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false;
if (!getQueriesCase().equals(other.getQueriesCase())) return false;
switch (queriesCase_) {
case 1:
if (!getQueryFileUri().equals(other.getQueryFileUri())) return false;
break;
case 2:
if (!getQueryList().equals(other.getQueryList())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CONTINUE_ON_FAILURE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getContinueOnFailure());
if (!internalGetScriptVariables().getMap().isEmpty()) {
hash = (37 * hash) + SCRIPT_VARIABLES_FIELD_NUMBER;
hash = (53 * hash) + internalGetScriptVariables().hashCode();
}
if (!internalGetProperties().getMap().isEmpty()) {
hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + internalGetProperties().hashCode();
}
if (getJarFileUrisCount() > 0) {
hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER;
hash = (53 * hash) + getJarFileUrisList().hashCode();
}
switch (queriesCase_) {
case 1:
hash = (37 * hash) + QUERY_FILE_URI_FIELD_NUMBER;
hash = (53 * hash) + getQueryFileUri().hashCode();
break;
case 2:
hash = (37 * hash) + QUERY_LIST_FIELD_NUMBER;
hash = (53 * hash) + getQueryList().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dataproc.v1.HiveJob parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dataproc.v1.HiveJob parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataproc.v1.HiveJob parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dataproc.v1.HiveJob prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* A Dataproc job for running [Apache Hive](https://hive.apache.org/)
* queries on YARN.
*
*
* Protobuf type {@code google.cloud.dataproc.v1.HiveJob}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.HiveJob)
com.google.cloud.dataproc.v1.HiveJobOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataproc.v1.JobsProto
.internal_static_google_cloud_dataproc_v1_HiveJob_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(int number) {
switch (number) {
case 4:
return internalGetScriptVariables();
case 5:
return internalGetProperties();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
switch (number) {
case 4:
return internalGetMutableScriptVariables();
case 5:
return internalGetMutableProperties();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataproc.v1.JobsProto
.internal_static_google_cloud_dataproc_v1_HiveJob_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataproc.v1.HiveJob.class,
com.google.cloud.dataproc.v1.HiveJob.Builder.class);
}
// Construct using com.google.cloud.dataproc.v1.HiveJob.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
continueOnFailure_ = false;
internalGetMutableScriptVariables().clear();
internalGetMutableProperties().clear();
jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
queriesCase_ = 0;
queries_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataproc.v1.JobsProto
.internal_static_google_cloud_dataproc_v1_HiveJob_descriptor;
}
@java.lang.Override
public com.google.cloud.dataproc.v1.HiveJob getDefaultInstanceForType() {
return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataproc.v1.HiveJob build() {
com.google.cloud.dataproc.v1.HiveJob result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataproc.v1.HiveJob buildPartial() {
com.google.cloud.dataproc.v1.HiveJob result = new com.google.cloud.dataproc.v1.HiveJob(this);
int from_bitField0_ = bitField0_;
if (queriesCase_ == 1) {
result.queries_ = queries_;
}
if (queriesCase_ == 2) {
if (queryListBuilder_ == null) {
result.queries_ = queries_;
} else {
result.queries_ = queryListBuilder_.build();
}
}
result.continueOnFailure_ = continueOnFailure_;
result.scriptVariables_ = internalGetScriptVariables();
result.scriptVariables_.makeImmutable();
result.properties_ = internalGetProperties();
result.properties_.makeImmutable();
if (((bitField0_ & 0x00000004) != 0)) {
jarFileUris_ = jarFileUris_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.jarFileUris_ = jarFileUris_;
result.queriesCase_ = queriesCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dataproc.v1.HiveJob) {
return mergeFrom((com.google.cloud.dataproc.v1.HiveJob) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataproc.v1.HiveJob other) {
if (other == com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance()) return this;
if (other.getContinueOnFailure() != false) {
setContinueOnFailure(other.getContinueOnFailure());
}
internalGetMutableScriptVariables().mergeFrom(other.internalGetScriptVariables());
internalGetMutableProperties().mergeFrom(other.internalGetProperties());
if (!other.jarFileUris_.isEmpty()) {
if (jarFileUris_.isEmpty()) {
jarFileUris_ = other.jarFileUris_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureJarFileUrisIsMutable();
jarFileUris_.addAll(other.jarFileUris_);
}
onChanged();
}
switch (other.getQueriesCase()) {
case QUERY_FILE_URI:
{
queriesCase_ = 1;
queries_ = other.queries_;
onChanged();
break;
}
case QUERY_LIST:
{
mergeQueryList(other.getQueryList());
break;
}
case QUERIES_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dataproc.v1.HiveJob parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dataproc.v1.HiveJob) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int queriesCase_ = 0;
private java.lang.Object queries_;
public QueriesCase getQueriesCase() {
return QueriesCase.forNumber(queriesCase_);
}
public Builder clearQueries() {
queriesCase_ = 0;
queries_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
*
*
*
* The HCFS URI of the script that contains Hive queries.
*
* Optional. Whether to continue executing queries if a query fails.
* The default value is `false`. Setting to `true` can be useful when
* executing independent parallel queries.
*
* Optional. Whether to continue executing queries if a query fails.
* The default value is `false`. Setting to `true` can be useful when
* executing independent parallel queries.
*
*
* bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The continueOnFailure to set.
* @return This builder for chaining.
*/
public Builder setContinueOnFailure(boolean value) {
continueOnFailure_ = value;
onChanged();
return this;
}
/**
*
*
*
* Optional. Whether to continue executing queries if a query fails.
* The default value is `false`. Setting to `true` can be useful when
* executing independent parallel queries.
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
*
* map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public boolean containsProperties(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
return internalGetProperties().getMap().containsKey(key);
}
/** Use {@link #getPropertiesMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getProperties() {
return getPropertiesMap();
}
/**
*
*
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
*
* map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.lang.String getPropertiesOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
java.util.Map map = internalGetProperties().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearProperties() {
internalGetMutableProperties().getMutableMap().clear();
return this;
}
/**
*
*
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
*
* map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeProperties(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
internalGetMutableProperties().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map getMutableProperties() {
return internalGetMutableProperties().getMutableMap();
}
/**
*
*
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
*
* map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder putProperties(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new java.lang.NullPointerException();
}
if (value == null) {
throw new java.lang.NullPointerException();
}
internalGetMutableProperties().getMutableMap().put(key, value);
return this;
}
/**
*
*
*
* Optional. A mapping of property names and values, used to configure Hive.
* Properties that conflict with values set by the Dataproc API may be
* overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
* /etc/hive/conf/hive-site.xml, and classes in user code.
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the jarFileUris.
*/
public com.google.protobuf.ProtocolStringList getJarFileUrisList() {
return jarFileUris_.getUnmodifiableView();
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of jarFileUris.
*/
public int getJarFileUrisCount() {
return jarFileUris_.size();
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The jarFileUris at the given index.
*/
public java.lang.String getJarFileUris(int index) {
return jarFileUris_.get(index);
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the jarFileUris at the given index.
*/
public com.google.protobuf.ByteString getJarFileUrisBytes(int index) {
return jarFileUris_.getByteString(index);
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The jarFileUris to set.
* @return This builder for chaining.
*/
public Builder setJarFileUris(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureJarFileUrisIsMutable();
jarFileUris_.set(index, value);
onChanged();
return this;
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The jarFileUris to add.
* @return This builder for chaining.
*/
public Builder addJarFileUris(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureJarFileUrisIsMutable();
jarFileUris_.add(value);
onChanged();
return this;
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*
*
* repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The jarFileUris to add.
* @return This builder for chaining.
*/
public Builder addAllJarFileUris(java.lang.Iterable values) {
ensureJarFileUrisIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_);
onChanged();
return this;
}
/**
*
*
*
* Optional. HCFS URIs of jar files to add to the CLASSPATH of the
* Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
* and UDFs.
*