Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use the Scala shell - Amazon EMR

Use the Scala shell

The Flink Scala shell for EMR clusters is only configured to start new YARN sessions. You can use the Scala shell by following the procedure below.

Use the Flink Scala shell on the primary node
  1. Log in to the primary node with SSH as described in Connect to the primary node with SSH.

  2. Type the following to start a shell:

    In Amazon EMR version 5.5.0 and later, you can use the following command to start a Yarn cluster for the Scala Shell with one TaskManager.

    % flink-scala-shell yarn 1

    In earlier versions of Amazon EMR, use:

    % /usr/lib/flink/bin/start-scala-shell.sh yarn 1

    This starts the Flink Scala shell so you can interactively use Flink. Just as with other interfaces and options, you can scale the -n option value used in the example based on the number of tasks you want to run from the shell.

    For more information, see Scala REPL in the official Apache Flink documentation.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.