Class Session

java.lang.Object
software.amazon.awssdk.services.glue.model.Session
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Session.Builder,Session>

@Generated("software.amazon.awssdk:codegen") public final class Session extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Session.Builder,Session>

The period in which a remote Spark runtime environment is running.

See Also:
  • Method Details

    • id

      public final String id()

      The ID of the session.

      Returns:
      The ID of the session.
    • createdOn

      public final Instant createdOn()

      The time and date when the session was created.

      Returns:
      The time and date when the session was created.
    • status

      public final SessionStatus status()

      The session status.

      If the service returns an enum value that is not available in the current SDK version, status will return SessionStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The session status.
      See Also:
    • statusAsString

      public final String statusAsString()

      The session status.

      If the service returns an enum value that is not available in the current SDK version, status will return SessionStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The session status.
      See Also:
    • errorMessage

      public final String errorMessage()

      The error message displayed during the session.

      Returns:
      The error message displayed during the session.
    • description

      public final String description()

      The description of the session.

      Returns:
      The description of the session.
    • role

      public final String role()

      The name or Amazon Resource Name (ARN) of the IAM role associated with the Session.

      Returns:
      The name or Amazon Resource Name (ARN) of the IAM role associated with the Session.
    • command

      public final SessionCommand command()

      The command object.See SessionCommand.

      Returns:
      The command object.See SessionCommand.
    • hasDefaultArguments

      public final boolean hasDefaultArguments()
      For responses, this returns true if the service returned a value for the DefaultArguments property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • defaultArguments

      public final Map<String,String> defaultArguments()

      A map array of key-value pairs. Max is 75 pairs.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasDefaultArguments() method.

      Returns:
      A map array of key-value pairs. Max is 75 pairs.
    • connections

      public final ConnectionsList connections()

      The number of connections used for the session.

      Returns:
      The number of connections used for the session.
    • progress

      public final Double progress()

      The code execution progress of the session.

      Returns:
      The code execution progress of the session.
    • maxCapacity

      public final Double maxCapacity()

      The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.

      Returns:
      The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.
    • securityConfiguration

      public final String securityConfiguration()

      The name of the SecurityConfiguration structure to be used with the session.

      Returns:
      The name of the SecurityConfiguration structure to be used with the session.
    • glueVersion

      public final String glueVersion()

      The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.

      Returns:
      The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.
    • numberOfWorkers

      public final Integer numberOfWorkers()

      The number of workers of a defined WorkerType to use for the session.

      Returns:
      The number of workers of a defined WorkerType to use for the session.
    • workerType

      public final WorkerType workerType()

      The type of predefined worker that is allocated when a session runs. Accepts a value of G.1X, G.2X, G.4X, or G.8X for Spark sessions. Accepts the value Z.2X for Ray sessions.

      If the service returns an enum value that is not available in the current SDK version, workerType will return WorkerType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from workerTypeAsString().

      Returns:
      The type of predefined worker that is allocated when a session runs. Accepts a value of G.1X , G.2X, G.4X, or G.8X for Spark sessions. Accepts the value Z.2X for Ray sessions.
      See Also:
    • workerTypeAsString

      public final String workerTypeAsString()

      The type of predefined worker that is allocated when a session runs. Accepts a value of G.1X, G.2X, G.4X, or G.8X for Spark sessions. Accepts the value Z.2X for Ray sessions.

      If the service returns an enum value that is not available in the current SDK version, workerType will return WorkerType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from workerTypeAsString().

      Returns:
      The type of predefined worker that is allocated when a session runs. Accepts a value of G.1X , G.2X, G.4X, or G.8X for Spark sessions. Accepts the value Z.2X for Ray sessions.
      See Also:
    • completedOn

      public final Instant completedOn()

      The date and time that this session is completed.

      Returns:
      The date and time that this session is completed.
    • executionTime

      public final Double executionTime()

      The total time the session ran for.

      Returns:
      The total time the session ran for.
    • dpuSeconds

      public final Double dpuSeconds()

      The DPUs consumed by the session (formula: ExecutionTime * MaxCapacity).

      Returns:
      The DPUs consumed by the session (formula: ExecutionTime * MaxCapacity).
    • idleTimeout

      public final Integer idleTimeout()

      The number of minutes when idle before the session times out.

      Returns:
      The number of minutes when idle before the session times out.
    • profileName

      public final String profileName()

      The name of an Glue usage profile associated with the session.

      Returns:
      The name of an Glue usage profile associated with the session.
    • toBuilder

      public Session.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Session.Builder,Session>
      Returns:
      a builder for type T
    • builder

      public static Session.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Session.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.