This topic describes how to modify the memory parameters of the Hive service.
Scenarios
As your business workload increases, we recommend that you increase the memory size of HiveMetaStore if all of the following situations occur: a long job latency occurs due to metadata-related operations, an exception occurs on HiveMetaStore, and the memory metrics indicate that the memory is insufficient. For example, if the garbage collection-related metrics of HiveMetaStore exceed the thresholds, the memory is insufficient. If similar situations occur on HiveServer2, you can increase the memory size of HiveServer2.
Precautions
If you select DLF Unified Metadata for the Metadata parameter when you create a cluster, HiveMetaStore is not enabled in the cluster. For more information about different types of metadatabases, see Hive metadata.
Procedure
On the Configure tab of the Hive service page, enter the keyword of the parameter that you want to modify in the search box and click the search icon to find the parameter. Then, modify the parameter value.
Adjust the memory size of HiveMetaStore.
Modify the hive_metastore_heapsize parameter. The default value of this parameter is 500, in MiB. You can modify this parameter based on your business requirements and the available memory of your machine. For example, you can change the value of this parameter to 2048 (2 GiB). After you modify the parameter, click Save. In the dialog box that appears, configure the Execution Reason parameter and click Save. Then, restart HiveMetaStore on the Status tab and view the status of HiveMetaStore.
Adjust the memory size of HiveServer2.
Modify the hive_server2_heapsize parameter. You can modify this parameter based on your business requirements and the available memory of your machine. For example, you can change the value of this parameter to 2048 (2 GiB). After you modify the parameter, click Save. In the dialog box that appears, configure the Execution Reason parameter and click Save. Then, restart HiveServer2 on the Status tab and view the status of HiveServer2.