El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ MapReduce Service/ Component Operation Guide (ME-Abu Dhabi Region)/ Using Hive/ Permission Management/ Configuring Permissions for Hive Tables, Columns, or Databases

Configuring Permissions for Hive Tables, Columns, or Databases

Updated on 2024-07-19 GMT+08:00

Scenario

You can configure related permissions if you need to access tables or databases created by other users. Hive supports column-based permission control. If a user needs to access some columns in tables created by other users, the user must be granted the permission for columns. The following describes how to grant table, column, and database permissions to users by using the role management function of MRS Manager.

NOTE:
  • You can configure permissions for Hive tables, columns, or databases only in security mode.
  • MRS 3.x or later supports Ranger. If the current component uses Ranger for permission control, you need to configure permission management policies based on Ranger. For details, see Adding a Ranger Access Permission Policy for Hive.

Prerequisites

  • You have obtained a user account with the administrator permissions, such as admin.
  • You have created a role, for example, hrole, on Manager by referring to instructions in Creating a Hive Role. You do not need to set the Hive permission but need to set the permission to submit the HQL command to Yarn for execution.
  • You have created two Hive human-machine users, such as huser1 and huser2, on Manager and added them to the hive group. huser2 has been bound to hrole. The hdb database has created by user huser1 and the htable table has been created in the database.

Procedure

  • Granting Table Permissions

    Users have complete permission on the tables created by themselves in Hive and the HDFS. To access the tables created by others, they need to be granted the permission. After the Hive metadata permission is granted, the HDFS permission is automatically granted. The procedure for granting a role the permission of querying, inserting, and deleting htable data is as follows:

    For versions earlier than MRS 3.x, perform the following operations to grant table permissions:

    1. On MRS Manager, choose System > Permission > Manage Role.
    2. Locate the row that contains hrole, and click Modify.
    3. Choose Hive > Hive Read Write Privileges.
    4. Click the name of the specified database hdb in the database list. Table htable in the database is displayed.
    5. In the Permission column of the htable table, select Select, Insert, and Delete.
    6. Click OK.

    For MRS 3.x or later, perform the following operations to grant table permissions:

    1. On FusionInsight Manager, choose System > Permission > Role.
    2. Locate the row that contains hrole, and click Modify.
    3. Choose Name of the desired cluster > Hive > Hive Read Write Privileges.
    4. Click the name of the specified database hdb in the database list. Table htable in the database is displayed.
    5. In the Permission column of the htable table, select SELECT, INSERT, and DELETE.
    6. Click OK.
NOTE:

In role management, the procedure for granting a role the permission of querying, inserting, and deleting Hive external table data is the same. After the metadata permission is granted, the HDFS permission is automatically granted.

  • Granting Column Permissions

    Users have all permissions for the tables created by themselves in Hive and HDFS. Users do not have the permission to access the tables created by others. If a user needs to access some columns in tables created by other users, the user must be granted the permission for columns. After the Hive metadata permission is granted, the HDFS permission is automatically granted. The procedure for granting a role the permission of querying and inserting data in hcol of htable is as follows:

    For versions earlier than MRS 3.x, perform the following operations to grant column permissions:

    1. On MRS Manager, choose System > Permission > Manage Role.
    2. Locate the row that contains hrole, and click Modify.
    3. Choose Hive > Hive Read Write Privileges.
    4. In the database list, click the specified database hdb to display the htable table in the database. Click the htable table to display the hcol column in the table.
    5. In the Permission column of the hcol column, select Select and Insert.
    6. Click OK.

    For MRS 3.x or later, perform the following operations:

    1. On FusionInsight Manager, choose System > Permission > Role.
    2. Locate the row that contains hrole, and click Modify.
    3. Choose Name of the desired cluster > Hive > Hive Read Write Privileges.
    4. In the database list, click the specified database hdb to display the htable table in the database. Click the htable table to display the hcol column in the table.
    5. In the Permission column of the hcol column, select SELECT and INSERT.
    6. Click OK.
NOTE:

In role management, after the metadata permission is granted, the HDFS permission is automatically granted. Therefore, after the column permission is granted, the HDFS ACL permission for all files of the table is automatically granted.

  • Granting Database Permissions

    Users have complete permission on the databases created by themselves in Hive and the HDFS. To access the databases created by others, they need to be granted the permission. After the Hive metadata permission is granted, the HDFS permission is automatically granted. The procedure for granting a role the permission of querying data and creating tables in database hdb is as follows. Other types of database operation permission are not supported.

    For versions earlier than MRS 3.x, perform the following database authorization operations:

    1. On MRS Manager, choose System > Permission > Manage Role.
    2. Locate the row that contains hrole, and click Modify.
    3. Choose Hive > Hive Read Write Privileges.
    4. In the Permission column of the hdb database, select Select and Create.
    5. Click OK.

    For MRS 3.x or later, perform the following operations to grant database permissions:

    1. On FusionInsight Manager, choose System > Permission > Role.
    2. Locate the row that contains hrole, and click Modify.
    3. Choose Name of the desired cluster > Hive > Hive Read Write Privileges.
    4. In the Permission column of the hdb database, select SELECT and CREATE.
    5. Click OK.
NOTE:
  • Any permission for a table in the database is automatically associated with the HDFS permission for the database directory to facilitate permission management. When any permission for a table is canceled, the system does not automatically cancel the HDFS permission for the database directory to ensure performance. In this case, users can only log in to the database and view table names.
  • When the query permission on a database is added to or deleted from a role, the query permission on tables in the database is automatically added to or deleted from the role.

Concepts

Table 1 Scenarios of using Hive tables, columns, or databases

Scenario

Required Permission

DESCRIBE TABLE

SELECT

SHOW PARTITIONS

SELECT

ANALYZE TABLE

SELECT and INSERT

SHOW COLUMNS

SELECT

SHOW TABLE STATUS

SELECT

SHOW TABLE PROPERTIES

SELECT

SELECT

SELECT

EXPLAIN

SELECT

CREATE VIEW

SELECT, Grant Of Select, and CREATE

SHOW CREATE TABLE

SELECT and Grant Of Select

CREATE TABLE

CREATE

ALTER TABLE ADD PARTITION

INSERT

INSERT

INSERT

INSERT OVERWRITE

INSERT and DELETE

LOAD

INSERT and DELETE

ALTER TABLE DROP PARTITION

DELETE

CREATE FUNCTION

Hive Admin Privilege

DROP FUNCTION

Hive Admin Privilege

ALTER DATABASE

Hive Admin Privilege

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback