Example usage for org.apache.hadoop.registry.client.types ServiceRecord get

List of usage examples for org.apache.hadoop.registry.client.types ServiceRecord get

Introduction

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

Prototype

public String get(String key, String defVal) 

Source Link

Document

Get the "other" attribute with a specific key.

Usage

From source file:org.apache.slider.client.SliderClient.java

License:Apache License

/**
 * Log a service record instance/*from   w ww .  j a  v a  2s .  co  m*/
 * @param instance record
 * @param verbose verbose logging of all external endpoints
 */
private void logInstance(ServiceRecord instance, boolean verbose) {
    if (!verbose) {
        log.info("{}", instance.get(YarnRegistryAttributes.YARN_ID, ""));
    } else {
        log.info("{}: ", instance.get(YarnRegistryAttributes.YARN_ID, ""));
        logEndpoints(instance);
    }
}