All Products
Search
Document Center

E-MapReduce:Configure a host

Last Updated:May 17, 2023

Presto clusters created based on Container Service for Kubernetes (ACK) clusters support custom hosts. Custom hosts provide correct configurations of domain name resolution for Presto clusters created based on ACK clusters to read the Hive data of E-MapReduce (EMR) clusters created based on Elastic Compute Service (ECS) instances. This topic describes how to configure a host.

Background information

The following error occurs if the host configurations of a Presto cluster are incorrect:

java.net.UnknownHostException: emr-header-1.cluster-xxxx

Prerequisites

A Presto cluster is created on the EMR on ACK page of the EMR console. For more information, see Create a cluster.

Procedure

  1. Go to the hosts.properties tab.

    1. Log on to the EMR on ACK console.

    2. On the EMR on ACK page, find the Presto cluster that you want to manage and click Configure in the Actions column.

    3. On the Configure tab, choose More > hosts.properties.

  2. Add a configuration item.

    1. On the hosts.properties tab, click Add Configuration Item.

    2. In the Add Configuration Item dialog box, set the Key parameter to an internal IP address and the Value parameter to a hostname.

      In most cases, you need to only specify the internal IP address and hostname of the machine on which the emr-header-1 node resides. This allows you to access the Hive data of EMR clusters created based on ECS instances. Add

      Note
      • Internal IP address: In the EMR console of the previous version, you can obtain the internal IP address on the Instances page. In the new EMR console, you can obtain the internal IP address on the Nodes page.

      • Hostname: You can run the hostname command on the Header node to obtain the hostname.

    3. Click OK.

    4. In the dialog box that appears, enter a reason in the Execution Reason field, and then click Save.

  3. Restart the Presto service.

    1. In the upper part of the page, click the Service Details tab.

    2. In the Components section, find the TrinoCoordinator and TrinoWorker components and click Restart in the Actions column.

    3. In each dialog box that appears, enter a reason in the Execution Reason field and click OK.

    4. In the Confirm message, click OK.

      After the Presto service is restarted, you can access Hive data.