Example usage for org.apache.hadoop.registry.client.types ProtocolTypes PROTOCOL_TCP

List of usage examples for org.apache.hadoop.registry.client.types ProtocolTypes PROTOCOL_TCP

Introduction

In this page you can find the example usage for org.apache.hadoop.registry.client.types ProtocolTypes PROTOCOL_TCP.

Prototype

String PROTOCOL_TCP

To view the source code for org.apache.hadoop.registry.client.types ProtocolTypes PROTOCOL_TCP.

Click Source Link

Document

Custom TCP protocol: .

Usage

From source file:org.apache.slider.server.appmaster.state.RoleInstance.java

License:Apache License

/**
 * Register a port endpoint as an inet-addr formatted endpoint, using the
 * hostname as the first part of the address
 * @param port port port//from   w w  w  .  j  a  v  a  2s .co  m
 * @param api  API API name
 */
public void registerPortEndpoint(int port, String api) {
    Endpoint epr = RegistryTypeUtils.inetAddrEndpoint(api, ProtocolTypes.PROTOCOL_TCP, host, port);
    addEndpoint(epr);
}