This topic describes how to access JindoFS in password-free mode from an ECS instance (not an instance in EMR clusters) when you use JindoFS SDK.
Prerequisites
Background information
Step 1: Create an instance RAM role
- Log on to the RAM console with an Alibaba Cloud account.
- In the left-side navigation pane, click RAM Roles.
- On the RAM Roles page that appears, click Create RAM Role. In the pane that appears, select Alibaba Cloud Service for Trusted entity type.
- Click Next.
- Enter a role name in the RAM Role Name field and select Elastic Compute Service from the Select Trusted Service drop-down list.
- Click OK.
Step 2: Grant permissions to the RAM role
- Log on to the RAM console with an Alibaba Cloud account.
- Optional. If you do not use system permissions, you can create custom permissions. For more information, see the "(Optional) Create a custom authorization policy" section in Implement access control by using RAM.
- In the left-side navigation pane, click RAM Roles.
- Find the created RAM role and click Input and Attach in the Actions column.
- In the pane that appears, select System Policy or Custom Policy for Type.
- Enter the policy name.
- Click OK.
Step 3: Bind the RAM role to an ECS instance
Step 4: Configure environment variables on ECS
Run one of the following commands to configure environment variables on ECS:
export CLASSPATH=/xx/xx/jindofs-2.5.0-sdk.jar
HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/xx/xx/jindofs-2.5.0-sdk.jar