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

Redis-based CacheStore of HiveMetaStore

Updated on 2022-12-14 GMT+08:00

Scenario

The MetaStore service of Hive can cache the metadata of some tables in Redis.

Prerequisites

The Redis service has been installed in a cluster.

Configure Parameters Related to Metastore

  1. Log in to FusionInsight Manager. For details, see Accessing FusionInsight Manager. Choose Cluster > Name of the desired cluster > Services > Hive > Configurations > All Configurations > MetaStore(Role) > Customization. Modify the following parameters to interconnect the cache of MetaStore to the Redis service.

    Table 1 Parameters

    Parameter

    Value

    Description

    hive.metastore.rawstore.impl

    org.apache.hadoop.hive.metastore.cache.redis.RedisCachedStore

    (Mandatory) Implementation class of CachedStore. Use the customized RedisCachedStore.

    redis.cluster.host.and.port

    xxx.xxx.xxx.xxx:22400;xxx.xxx.xxx.xxx.xxx:22401

    (Mandatory) IP address and port number of any node in the Redis cluster. The format is ip:port. ip:port. The value cannot end with a semicolon (;).

    metastore.cached.rawstore.cached.object.whitelist

    catalog.database.table,catalog.database.table

    (Optional) Cache table whitelist. The configured tables are cached to Redis. Multiple tables are separated by commas (,). The default separator is .*, that is, all tables are cached.

    NOTE:

    The table name consists of catalog.database.table. The default catalog is hive.

    metastore.cached.rawstore.cached.object.blacklist

    catalog.database.table,catalog.database.table

    (Optional) Cache table blacklist. Tables that are not configured in the blacklist are not cached in Redis. Multiple tables are separated by commas (,). By default, this parameter is left blank.

    NOTE:

    The table name consists of catalog.database.table. The default catalog is hive.

    redis.cache.prewarm.cron

    cronTab expression, for example, 0 0 16 * *?

    (Optional) Periodically execute the corn expression of prewarm to update the data cached in the metabase to redisCache for synchronization.

    metastore.cached.rawstore.catalogs

    hive

    (Optional) Catalog to be cached. The default value is hive.

    jedis.pool.max.wait.mills

    30,000

    (Optional) Obtain the Redis connection timeout interval. In security mode, the timeout interval can be longer. The unit is ms. The default value is 30,000 ms.

    jedis.pool.max.idle

    200

    (Optional) Maximum number of idle connections in the Jedis connection pool. You are advised to set this parameter to the value of max.total. The default value is 200.

    jedis.pool.max.total

    200

    (Optional) Maximum number of connections in the Jedis connection pool. The default value is 200.

    redis.security.enabled

    true or false

    (Optional) Whether to enable the Redis cache security mode. The default value is true, indicating that the security mode is enabled.

    NOTE:

    If the cluster is installed in non-security mode, choose Cluster > Name of the desired cluster > Services > Redis > Configurations > All Configurations > Redis > Security and check whether the value of REDIS_SECURITY_ENABLED is false. If not, change it to false.Otherwise, the Redis service does not comply with the non-security mode of the current Metastore.

  2. Save the configuration and choose Dashboard > More > Restart Service to restart the Hive service.

Precautions

If Redis is switched back to the native non-cache mode and then switched back after a period of time, the added, deleted, or modified metadata cannot be synchronized to the Redis when the database is used. Therefore, before switching back, you must clear the cache table in the Redis and synchronize the metadata again in either of the following two clearing modes:

  • Log in to the Redis client and run the flushall command on all Redis nodes.
  • Log in to the Redis client and run the following commands to change the two Redis identifiers. {hiveServiceName} is the value of HIVE_DEFAULT_GROUP in the Metastore configuration file ENV_VARS. The default value is hive.

    set {hiveServiceName}-hive-isRedisAvailable false

    del {hiveServiceName}-hive-isCanPrewarm

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