Performing Operations on a Hudi Table Using Spark SQL
This section applies only to MRS 3.5.0-LTS or later.
Scenarios
This section describes how to use Hudi with Spark SQLs.
Prerequisites
You have created a user and added the user to user groups hadoop (primary group) and hive on FusionInsight Manager.
Procedure
- Download and install the Hudi client. For details, see Installing a Client.
Currently, Hudi is integrated in Spark. You only need to download the Spark client on FusionInsight Manager. For example, the client installation directory is /opt/client.
- Log in to the node where the client is installed as user root and run the following command:
cd /opt/client
- Run the following commands to load environment variables:
source bigdata_env
source Hudi/component_env
kinit Created user
- You need to change the password of the created user, and then run the kinit command to log in to the system again.
- In normal mode (Kerberos authentication disabled), you do not need to run the kinit command.
- If multiple services are installed, run the component_env command of the source Spark and then the component_env command of the source Hudi after you run the source bigdata_env command.
- Start Spark SQL.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.