Metalake administration
Service administrators create metalakes, and each metalake's owner enables, disables, and deletes it. What a metalake is, and what its boundary separates, is covered in Metalakes.
Quick start
The example creates the metalake production and points it at its first catalog.
- UI
- REST
-
Create the metalake. Open Configure → Metalakes and click + Metalake. Enter
productionas the Metalake name andProduction estateas the Description. -
Set the owner. Choose the Owner type, User or Group, and the Owner. Properties are optional. Click Create metalake.
-
Connect a catalog. A new metalake is empty. Select
productionin the metalake selector at the top of the navigation bar and see Catalogs and schemas.
-
Create the metalake. A comment and properties are optional.
Create a metalakecurl -sS -X POST "https://{gravitino_host}/api/metalakes" \
-H "Accept: application/vnd.gravitino.v1+json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"name": "production", "comment": "Production estate", "properties": {}}' -
Connect a catalog. A new metalake is empty. See Catalogs and schemas, using
productionin the path.
A new metalake has no members. Add users and groups to it and grant them roles before anyone else can work in it; see Access control.
Configure → Metalakes lists every metalake on the server with its status, catalog count, description, and owner.
Enable and disable
Disabling a metalake takes it out of service without deleting anything; what that blocks is described in Metalakes. Enabling a metalake that is already enabled does nothing, and the same is true of disabling one that is already disabled.
- UI
- REST
Select one or more metalakes in the list and click Enable or Disable, then confirm.
curl -sS -X PATCH "https://{gravitino_host}/api/metalakes/{metalake}" \
-H "Accept: application/vnd.gravitino.v1+json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"inUse": false}'
Send {"inUse": true} to enable it again.
Delete a metalake
Deleting a metalake removes it and everything registered under it: catalogs, schemas, users, roles, tags, policies, and job templates. External systems are left alone, so a Hive table or an S3 bucket that was registered rather than created by Gravitino survives. Managed objects, such as a managed fileset, are removed with their data.
- UI
- REST
-
Disable it. An enabled metalake cannot be deleted. Clicking Delete metalake on one offers to disable it first.
-
Delete it. Click Delete metalake again. The confirmation lists how many catalogs, users, and roles go with it. Type the metalake name and confirm.
curl -sS -X DELETE "https://{gravitino_host}/api/metalakes/{metalake}?force=true" \
-H "Accept: application/vnd.gravitino.v1+json" \
-H "Authorization: Bearer $TOKEN"
Without force, the request fails unless the metalake is disabled and has no catalogs. With
force=true, it succeeds whether or not the metalake is enabled.
Permissions
Creating a metalake is reserved for service administrators, set with the chart value
gravitino.authorization.serviceAdmins (a comma-separated list of user names, admin by default).
Nobody else can create one, whatever privileges they hold.
Altering, enabling, disabling, and deleting a metalake are reserved for its owner.
API
Metalakes can be created, listed, altered, enabled, disabled, and deleted over REST and through the Java and Python admin clients. The REST reference documents each call, with the client code under the Java and Python tabs.