This section describes how to enable storage and compute decoupling for the Guardian component. After this feature is enabled, Guardian can provide temporary authentication credentials for services such as HDFS, Hive, Spark, Loader, and HetuEngine to access OBS when decoupled storage and compute are used.
Perform the following steps to interconnect Guardian with OBS:
The name of an enterprise project must be the same as that of the MRS cluster. Set other parameters.
{ "Version": "1.1", "Statement": [ { "Action": [ "iam:agencies:assume" ], "Resource": { "uri": [ "/iam/agencies/{Agency ID}" ] }, "Effect": "Allow" } ] }
Parameter |
Description |
Value |
---|---|---|
fs.obs.guardian.accesslabel.enabled |
Whether to enable access label for using Guardian to connect to OBS. |
true |
fs.obs.guardian.enabled |
Whether to enable Guardian. |
true |
fs.obs.delegation.token.providers |
Delegation token generator. If fs.obs.guardian.enabled is set to true, configure both com.example.mrs.dt.MRSDelegationTokenProvider and com.example.mrs.dt.GuardianDTProvider. |
com.example.mrs.dt.MRSDelegationTokenProvider and com.example.mrs.dt.GuardianDTProvider |
token.server.access.label.agency.name |
Name of the specified IAM agency, which is the agency created in Creating an Agency for a Regular Account. |
agency-MRS-to-OBS |
sh /opt/executor/bin/refresh-client-config.sh
For clusters that use decoupled storage and compute, configure a lifecycle policy for the related directories by referring to this chapter. Otherwise, the storage space may be used up and storage fees may increase.
Parameter |
Description |
Example |
---|---|---|
Status |
Whether to enable the lifecycle rule. |
Enable |
Rule Name |
User-defined rule name, which is used to identify different lifecycle configurations. |
rule-test |
Prefix |
Prefix of the objects to which the lifecycle rule applies. Generally, the recycle bin directory of MRS components is /user/.Trash. |
user/.Trash |
Transition to Infrequent Access After (Days) |
Number of days before transitioning to infrequent access after the object is last updated. The value of this parameter must be at least 30. |
30 days |
Transition to Archive After (Days) |
Number of days before transitioning to archive after the object is last updated. If Transition to Infrequent Access After (Days) is also configured, after the lifecycle is transitioned to infrequent access, wait at least 30 days before transitioning it to archive. If only Transition to Archive After (Days) is configured, there is no time limit. |
31 days |
Delete Files After (Days) |
Number of days before being deleted by OBS after the object is last updated. This parameter must be larger than the above two parameters. |
32 days |
Delete Fragments After (Days) |
Number of days before fragments are expired and deleted by OBS automatically. |
30 days |
To modify the lifecycle configuration, locate the lifecycle rule, click Edit or Disable on the right. Click Enable to enable the lifecycle rule.