Class PrestoJob.Builder

  • All Implemented Interfaces:
    PrestoJobOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    PrestoJob

    public static final class PrestoJob.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
    implements PrestoJobOrBuilder
     A Dataproc job for running [Presto](https://prestosql.io/) queries.
     **IMPORTANT**: The [Dataproc Presto Optional
     Component](https://cloud.google.com/dataproc/docs/concepts/components/presto)
     must be enabled when the cluster is created to submit a Presto job to the
     cluster.
     
    Protobuf type google.cloud.dataproc.v1.PrestoJob
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • clear

        public PrestoJob.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • getDefaultInstanceForType

        public PrestoJob getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public PrestoJob build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public PrestoJob buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public PrestoJob.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • setField

        public PrestoJob.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                          Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • clearField

        public PrestoJob.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • clearOneof

        public PrestoJob.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • setRepeatedField

        public PrestoJob.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  int index,
                                                  Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • addRepeatedField

        public PrestoJob.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • mergeFrom

        public PrestoJob.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PrestoJob.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • mergeFrom

        public PrestoJob.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PrestoJob.Builder>
        Throws:
        IOException
      • hasQueryFileUri

        public boolean hasQueryFileUri()
         The HCFS URI of the script that contains SQL queries.
         
        string query_file_uri = 1;
        Specified by:
        hasQueryFileUri in interface PrestoJobOrBuilder
        Returns:
        Whether the queryFileUri field is set.
      • getQueryFileUri

        public String getQueryFileUri()
         The HCFS URI of the script that contains SQL queries.
         
        string query_file_uri = 1;
        Specified by:
        getQueryFileUri in interface PrestoJobOrBuilder
        Returns:
        The queryFileUri.
      • getQueryFileUriBytes

        public com.google.protobuf.ByteString getQueryFileUriBytes()
         The HCFS URI of the script that contains SQL queries.
         
        string query_file_uri = 1;
        Specified by:
        getQueryFileUriBytes in interface PrestoJobOrBuilder
        Returns:
        The bytes for queryFileUri.
      • setQueryFileUri

        public PrestoJob.Builder setQueryFileUri​(String value)
         The HCFS URI of the script that contains SQL queries.
         
        string query_file_uri = 1;
        Parameters:
        value - The queryFileUri to set.
        Returns:
        This builder for chaining.
      • clearQueryFileUri

        public PrestoJob.Builder clearQueryFileUri()
         The HCFS URI of the script that contains SQL queries.
         
        string query_file_uri = 1;
        Returns:
        This builder for chaining.
      • setQueryFileUriBytes

        public PrestoJob.Builder setQueryFileUriBytes​(com.google.protobuf.ByteString value)
         The HCFS URI of the script that contains SQL queries.
         
        string query_file_uri = 1;
        Parameters:
        value - The bytes for queryFileUri to set.
        Returns:
        This builder for chaining.
      • hasQueryList

        public boolean hasQueryList()
         A list of queries.
         
        .google.cloud.dataproc.v1.QueryList query_list = 2;
        Specified by:
        hasQueryList in interface PrestoJobOrBuilder
        Returns:
        Whether the queryList field is set.
      • getQueryList

        public QueryList getQueryList()
         A list of queries.
         
        .google.cloud.dataproc.v1.QueryList query_list = 2;
        Specified by:
        getQueryList in interface PrestoJobOrBuilder
        Returns:
        The queryList.
      • setQueryList

        public PrestoJob.Builder setQueryList​(QueryList value)
         A list of queries.
         
        .google.cloud.dataproc.v1.QueryList query_list = 2;
      • mergeQueryList

        public PrestoJob.Builder mergeQueryList​(QueryList value)
         A list of queries.
         
        .google.cloud.dataproc.v1.QueryList query_list = 2;
      • clearQueryList

        public PrestoJob.Builder clearQueryList()
         A list of queries.
         
        .google.cloud.dataproc.v1.QueryList query_list = 2;
      • getQueryListBuilder

        public QueryList.Builder getQueryListBuilder()
         A list of queries.
         
        .google.cloud.dataproc.v1.QueryList query_list = 2;
      • getContinueOnFailure

        public boolean getContinueOnFailure()
         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];
        Specified by:
        getContinueOnFailure in interface PrestoJobOrBuilder
        Returns:
        The continueOnFailure.
      • setContinueOnFailure

        public PrestoJob.Builder setContinueOnFailure​(boolean value)
         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];
        Parameters:
        value - The continueOnFailure to set.
        Returns:
        This builder for chaining.
      • clearContinueOnFailure

        public PrestoJob.Builder clearContinueOnFailure()
         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];
        Returns:
        This builder for chaining.
      • getOutputFormat

        public String getOutputFormat()
         Optional. The format in which query output will be displayed. See the
         Presto documentation for supported output formats
         
        string output_format = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getOutputFormat in interface PrestoJobOrBuilder
        Returns:
        The outputFormat.
      • getOutputFormatBytes

        public com.google.protobuf.ByteString getOutputFormatBytes()
         Optional. The format in which query output will be displayed. See the
         Presto documentation for supported output formats
         
        string output_format = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getOutputFormatBytes in interface PrestoJobOrBuilder
        Returns:
        The bytes for outputFormat.
      • setOutputFormat

        public PrestoJob.Builder setOutputFormat​(String value)
         Optional. The format in which query output will be displayed. See the
         Presto documentation for supported output formats
         
        string output_format = 4 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The outputFormat to set.
        Returns:
        This builder for chaining.
      • clearOutputFormat

        public PrestoJob.Builder clearOutputFormat()
         Optional. The format in which query output will be displayed. See the
         Presto documentation for supported output formats
         
        string output_format = 4 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setOutputFormatBytes

        public PrestoJob.Builder setOutputFormatBytes​(com.google.protobuf.ByteString value)
         Optional. The format in which query output will be displayed. See the
         Presto documentation for supported output formats
         
        string output_format = 4 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for outputFormat to set.
        Returns:
        This builder for chaining.
      • getClientTagsList

        public com.google.protobuf.ProtocolStringList getClientTagsList()
         Optional. Presto client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getClientTagsList in interface PrestoJobOrBuilder
        Returns:
        A list containing the clientTags.
      • getClientTagsCount

        public int getClientTagsCount()
         Optional. Presto client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getClientTagsCount in interface PrestoJobOrBuilder
        Returns:
        The count of clientTags.
      • getClientTags

        public String getClientTags​(int index)
         Optional. Presto client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getClientTags in interface PrestoJobOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The clientTags at the given index.
      • getClientTagsBytes

        public com.google.protobuf.ByteString getClientTagsBytes​(int index)
         Optional. Presto client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getClientTagsBytes in interface PrestoJobOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the clientTags at the given index.
      • setClientTags

        public PrestoJob.Builder setClientTags​(int index,
                                               String value)
         Optional. Presto client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        index - The index to set the value at.
        value - The clientTags to set.
        Returns:
        This builder for chaining.
      • addClientTags

        public PrestoJob.Builder addClientTags​(String value)
         Optional. Presto client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The clientTags to add.
        Returns:
        This builder for chaining.
      • addAllClientTags

        public PrestoJob.Builder addAllClientTags​(Iterable<String> values)
         Optional. Presto client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        values - The clientTags to add.
        Returns:
        This builder for chaining.
      • clearClientTags

        public PrestoJob.Builder clearClientTags()
         Optional. Presto client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • addClientTagsBytes

        public PrestoJob.Builder addClientTagsBytes​(com.google.protobuf.ByteString value)
         Optional. Presto client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes of the clientTags to add.
        Returns:
        This builder for chaining.
      • getPropertiesCount

        public int getPropertiesCount()
        Description copied from interface: PrestoJobOrBuilder
         Optional. A mapping of property names to values. Used to set Presto
         [session properties](https://prestodb.io/docs/current/sql/set-session.html)
         Equivalent to using the --session flag in the Presto CLI
         
        map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPropertiesCount in interface PrestoJobOrBuilder
      • containsProperties

        public boolean containsProperties​(String key)
         Optional. A mapping of property names to values. Used to set Presto
         [session properties](https://prestodb.io/docs/current/sql/set-session.html)
         Equivalent to using the --session flag in the Presto CLI
         
        map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsProperties in interface PrestoJobOrBuilder
      • getPropertiesMap

        public Map<String,​String> getPropertiesMap()
         Optional. A mapping of property names to values. Used to set Presto
         [session properties](https://prestodb.io/docs/current/sql/set-session.html)
         Equivalent to using the --session flag in the Presto CLI
         
        map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPropertiesMap in interface PrestoJobOrBuilder
      • getPropertiesOrDefault

        public String getPropertiesOrDefault​(String key,
                                             String defaultValue)
         Optional. A mapping of property names to values. Used to set Presto
         [session properties](https://prestodb.io/docs/current/sql/set-session.html)
         Equivalent to using the --session flag in the Presto CLI
         
        map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPropertiesOrDefault in interface PrestoJobOrBuilder
      • getPropertiesOrThrow

        public String getPropertiesOrThrow​(String key)
         Optional. A mapping of property names to values. Used to set Presto
         [session properties](https://prestodb.io/docs/current/sql/set-session.html)
         Equivalent to using the --session flag in the Presto CLI
         
        map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPropertiesOrThrow in interface PrestoJobOrBuilder
      • removeProperties

        public PrestoJob.Builder removeProperties​(String key)
         Optional. A mapping of property names to values. Used to set Presto
         [session properties](https://prestodb.io/docs/current/sql/set-session.html)
         Equivalent to using the --session flag in the Presto CLI
         
        map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL];
      • getMutableProperties

        @Deprecated
        public Map<String,​String> getMutableProperties()
        Deprecated.
        Use alternate mutation accessors instead.
      • putProperties

        public PrestoJob.Builder putProperties​(String key,
                                               String value)
         Optional. A mapping of property names to values. Used to set Presto
         [session properties](https://prestodb.io/docs/current/sql/set-session.html)
         Equivalent to using the --session flag in the Presto CLI
         
        map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL];
      • putAllProperties

        public PrestoJob.Builder putAllProperties​(Map<String,​String> values)
         Optional. A mapping of property names to values. Used to set Presto
         [session properties](https://prestodb.io/docs/current/sql/set-session.html)
         Equivalent to using the --session flag in the Presto CLI
         
        map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL];
      • hasLoggingConfig

        public boolean hasLoggingConfig()
         Optional. The runtime log config for job execution.
         
        .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasLoggingConfig in interface PrestoJobOrBuilder
        Returns:
        Whether the loggingConfig field is set.
      • getLoggingConfig

        public LoggingConfig getLoggingConfig()
         Optional. The runtime log config for job execution.
         
        .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLoggingConfig in interface PrestoJobOrBuilder
        Returns:
        The loggingConfig.
      • setLoggingConfig

        public PrestoJob.Builder setLoggingConfig​(LoggingConfig value)
         Optional. The runtime log config for job execution.
         
        .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      • setLoggingConfig

        public PrestoJob.Builder setLoggingConfig​(LoggingConfig.Builder builderForValue)
         Optional. The runtime log config for job execution.
         
        .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      • mergeLoggingConfig

        public PrestoJob.Builder mergeLoggingConfig​(LoggingConfig value)
         Optional. The runtime log config for job execution.
         
        .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      • clearLoggingConfig

        public PrestoJob.Builder clearLoggingConfig()
         Optional. The runtime log config for job execution.
         
        .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      • getLoggingConfigBuilder

        public LoggingConfig.Builder getLoggingConfigBuilder()
         Optional. The runtime log config for job execution.
         
        .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      • setUnknownFields

        public final PrestoJob.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>
      • mergeUnknownFields

        public final PrestoJob.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PrestoJob.Builder>