Use the Hudi CLI - Amazon EMR

Use the Hudi CLI

You can use the Hudi CLI to administer Hudi datasets to view information about commits, the filesystem, statistics, and more. You can also use the CLI to manually perform compactions, schedule compactions, or cancel scheduled compactions. For more information, see Interacting via CLI in the Apache Hudi documentation.

To start the Hudi CLI and connect to a dataset
  1. Connect to the master node using SSH. For more information, see Connect to the master node using SSH in the Amazon EMR Management Guide.

  2. At the command line, type /usr/lib/hudi/cli/bin/

    The command prompt changes to hudi->.

  3. Type the following code to connect to a dataset. Replace s3://DOC-EXAMPLE-BUCKET/myhudidataset with the path to the dataset that you want to work with. The value we use is the same as the value established in earlier examples.

    connect --path s3://DOC-EXAMPLE-BUCKET/myhudidataset

    The command prompt changes to include the dataset that you're connected to, as shown in the following example.