mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 14:30:28 -05:00
EMR's session operations, StartSession, GetSession, ListSessions, TerminateSession and GetSessionEndpoint, were not served, and RunJobFlow dropped SessionEnabled. Floci now keeps a cluster's sessions and their lifecycle, without starting a Spark Connect server for them. RunJobFlow keeps SessionEnabled and DescribeCluster reports it. StartSession needs a cluster with sessions enabled, on emr-spark-8.0.0 or later, with Spark, RUNNING or WAITING, with one primary node and fewer than 1000 sessions that have not ended, as the Management Guide's "Interactive sessions" gives them; a request needs a Name and an idle timeout within 24 hours. It answers SUBMITTED, and the session is IDLE from then on until its idle timeout (60 minutes by default), TerminateSession, or its cluster shutting down ends it. A retry with the same client request token that asks for the same session answers as the first call did. Sessions are kept apart from their clusters, so ended ones weigh on no cluster read or write. GetSessionEndpoint gives an endpoint on Floci's address and a token valid for an hour. ListSessions gives the newest first, by state, a page at a time. A request member of the wrong JSON type is refused with SerializationException. The cluster's installed applications are read by one helper, which the Hive and Pig checks now share with the Spark one. GetSessionEndpoint's endpoint and token come from core.common.SparkConnectEndpoint, which EMR Serverless's GetSessionEndpoint now uses too.