Class Session
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Session.Builder,Session>
Detailed information about a Spark Connect session.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal StringThe Amazon Web Services account ID that owns the session.final Stringarn()The Amazon Resource Name (ARN) of the session.static Session.Builderbuilder()final CertificateAuthorityThe certificate authority used to establish an mTLS connection to the Spark Connect server when connecting directly over VPC peering.final StringThe ID of the cluster that the session belongs to.final InstantThe date and time that the session was created.final InstantendedAt()The date and time that the session was terminated or failed.final List<Configuration> The configuration overrides for the session.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final StringThe execution role ARN for the session.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the EngineConfigurations property.final inthashCode()final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.final Stringid()The ID of the session.final InstantThe date and time that the session last entered theIDLEstate.The monitoring configuration for the session.final Stringname()The name of the session, if one was provided at creation time.final StringThe Amazon EMR release label of the cluster that the session is running on.static Class<? extends Session.Builder> final StringThe Spark Connect server URL for the session.final LongThe idle timeout, in minutes.final InstantThe date and time that the session entered theSTARTEDstate.final SessionStatestate()The current state of the session.final StringThe current state of the session.final StringA human-readable message describing the most recent state change.tags()The tags associated with the session.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final InstantThe date and time that the session was last updated.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
id
-
clusterId
The ID of the cluster that the session belongs to.
- Returns:
- The ID of the cluster that the session belongs to.
-
name
The name of the session, if one was provided at creation time.
- Returns:
- The name of the session, if one was provided at creation time.
-
arn
The Amazon Resource Name (ARN) of the session.
- Returns:
- The Amazon Resource Name (ARN) of the session.
-
state
The current state of the session. Valid values are
SUBMITTED,STARTING,STARTED,IDLE,BUSY,TERMINATING,TERMINATED, andFAILED.If the service returns an enum value that is not available in the current SDK version,
statewill returnSessionState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The current state of the session. Valid values are
SUBMITTED,STARTING,STARTED,IDLE,BUSY,TERMINATING,TERMINATED, andFAILED. - See Also:
-
stateAsString
The current state of the session. Valid values are
SUBMITTED,STARTING,STARTED,IDLE,BUSY,TERMINATING,TERMINATED, andFAILED.If the service returns an enum value that is not available in the current SDK version,
statewill returnSessionState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The current state of the session. Valid values are
SUBMITTED,STARTING,STARTED,IDLE,BUSY,TERMINATING,TERMINATED, andFAILED. - See Also:
-
stateChangeReason
A human-readable message describing the most recent state change.
- Returns:
- A human-readable message describing the most recent state change.
-
releaseLabel
The Amazon EMR release label of the cluster that the session is running on.
- Returns:
- The Amazon EMR release label of the cluster that the session is running on.
-
executionRoleArn
The execution role ARN for the session. Amazon EMR uses this role to access Amazon Web Services resources on your behalf during session execution.
- Returns:
- The execution role ARN for the session. Amazon EMR uses this role to access Amazon Web Services resources on your behalf during session execution.
-
accountId
The Amazon Web Services account ID that owns the session.
- Returns:
- The Amazon Web Services account ID that owns the session.
-
createdAt
The date and time that the session was created.
- Returns:
- The date and time that the session was created.
-
updatedAt
The date and time that the session was last updated.
- Returns:
- The date and time that the session was last updated.
-
startedAt
The date and time that the session entered the
STARTEDstate.- Returns:
- The date and time that the session entered the
STARTEDstate.
-
endedAt
The date and time that the session was terminated or failed.
- Returns:
- The date and time that the session was terminated or failed.
-
idleSince
The date and time that the session last entered the
IDLEstate.- Returns:
- The date and time that the session last entered the
IDLEstate.
-
hasEngineConfigurations
public final boolean hasEngineConfigurations()For responses, this returns true if the service returned a value for the EngineConfigurations property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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. -
engineConfigurations
The configuration overrides for the session. Only runtime configuration overrides are supported.
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
hasEngineConfigurations()method.- Returns:
- The configuration overrides for the session. Only runtime configuration overrides are supported.
-
monitoringConfiguration
The monitoring configuration for the session.
- Returns:
- The monitoring configuration for the session.
-
sessionIdleTimeoutInMinutes
The idle timeout, in minutes. If the session is idle for this duration, Amazon EMR automatically terminates it.
- Returns:
- The idle timeout, in minutes. If the session is idle for this duration, Amazon EMR automatically terminates it.
-
certificateAuthority
The certificate authority used to establish an mTLS connection to the Spark Connect server when connecting directly over VPC peering.
- Returns:
- The certificate authority used to establish an mTLS connection to the Spark Connect server when connecting directly over VPC peering.
-
serverUrl
The Spark Connect server URL for the session. Use this URL with the
Credentialsreturned byGetSessionEndpointto connect directly to the session over VPC peering.- Returns:
- The Spark Connect server URL for the session. Use this URL with the
Credentialsreturned byGetSessionEndpointto connect directly to the session over VPC peering.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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. -
tags
The tags associated with the session.
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
hasTags()method.- Returns:
- The tags associated with the session.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Session.Builder,Session> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-