Example usage for org.apache.hadoop.registry.client.binding RegistryTypeUtils ipcEndpoint

List of usage examples for org.apache.hadoop.registry.client.binding RegistryTypeUtils ipcEndpoint

Introduction

In this page you can find the example usage for org.apache.hadoop.registry.client.binding RegistryTypeUtils ipcEndpoint.

Prototype

public static Endpoint ipcEndpoint(String api, InetSocketAddress address) 

Source Link

Document

Create an IPC endpoint

Usage

From source file:org.apache.hive.service.server.HS2ActivePassiveHARegistry.java

License:Apache License

private void updateEndpoint(final ServiceRecord srv, final String endpointName) {
    final String instanceUri = srv.get(INSTANCE_URI_CONFIG);
    final String[] tokens = instanceUri.split(":");
    final String hostname = tokens[0];
    final int port = Integer.parseInt(tokens[1]);
    Endpoint urlEndpoint = RegistryTypeUtils.ipcEndpoint(endpointName, new InetSocketAddress(hostname, port));
    srv.addInternalEndpoint(urlEndpoint);
    LOG.info("Added {} endpoint to service record", urlEndpoint);
}