Class TrinoJob

  • All Implemented Interfaces:
    TrinoJobOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class TrinoJob
    extends com.google.protobuf.GeneratedMessageV3
    implements TrinoJobOrBuilder
     A Dataproc job for running [Trino](https://trino.io/) queries.
     **IMPORTANT**: The [Dataproc Trino Optional
     Component](https://cloud.google.com/dataproc/docs/concepts/components/trino)
     must be enabled when the cluster is created to submit a Trino job to the
     cluster.
     
    Protobuf type google.cloud.dataproc.v1.TrinoJob
    See Also:
    Serialized Form
    • Field Detail

      • QUERY_FILE_URI_FIELD_NUMBER

        public static final int QUERY_FILE_URI_FIELD_NUMBER
        See Also:
        Constant Field Values
      • QUERY_LIST_FIELD_NUMBER

        public static final int QUERY_LIST_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CONTINUE_ON_FAILURE_FIELD_NUMBER

        public static final int CONTINUE_ON_FAILURE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OUTPUT_FORMAT_FIELD_NUMBER

        public static final int OUTPUT_FORMAT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CLIENT_TAGS_FIELD_NUMBER

        public static final int CLIENT_TAGS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PROPERTIES_FIELD_NUMBER

        public static final int PROPERTIES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LOGGING_CONFIG_FIELD_NUMBER

        public static final int LOGGING_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasQueryFileUri

        public boolean hasQueryFileUri()
         The HCFS URI of the script that contains SQL queries.
         
        string query_file_uri = 1;
        Specified by:
        hasQueryFileUri in interface TrinoJobOrBuilder
        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 TrinoJobOrBuilder
        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 TrinoJobOrBuilder
        Returns:
        The bytes for queryFileUri.
      • hasQueryList

        public boolean hasQueryList()
         A list of queries.
         
        .google.cloud.dataproc.v1.QueryList query_list = 2;
        Specified by:
        hasQueryList in interface TrinoJobOrBuilder
        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 TrinoJobOrBuilder
        Returns:
        The queryList.
      • 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 TrinoJobOrBuilder
        Returns:
        The continueOnFailure.
      • getOutputFormat

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

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

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

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

        public String getClientTags​(int index)
         Optional. Trino client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getClientTags in interface TrinoJobOrBuilder
        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. Trino client tags to attach to this query
         
        repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getClientTagsBytes in interface TrinoJobOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the clientTags at the given index.
      • getPropertiesCount

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

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

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

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

        public String getPropertiesOrThrow​(String key)
         Optional. A mapping of property names to values. Used to set Trino
         [session properties](https://trino.io/docs/current/sql/set-session.html)
         Equivalent to using the --session flag in the Trino CLI
         
        map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getPropertiesOrThrow in interface TrinoJobOrBuilder
      • 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 TrinoJobOrBuilder
        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 TrinoJobOrBuilder
        Returns:
        The loggingConfig.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static TrinoJob parseFrom​(ByteBuffer data)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TrinoJob parseFrom​(ByteBuffer data,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TrinoJob parseFrom​(com.google.protobuf.ByteString data)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TrinoJob parseFrom​(com.google.protobuf.ByteString data,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TrinoJob parseFrom​(byte[] data)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TrinoJob parseFrom​(byte[] data,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TrinoJob parseFrom​(com.google.protobuf.CodedInputStream input,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws IOException
        Throws:
        IOException
      • newBuilderForType

        public TrinoJob.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public TrinoJob.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected TrinoJob.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static TrinoJob getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<TrinoJob> parser()
      • getParserForType

        public com.google.protobuf.Parser<TrinoJob> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public TrinoJob getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder