Example usage for org.apache.hadoop.net NetUtils getCanonicalUri

List of usage examples for org.apache.hadoop.net NetUtils getCanonicalUri

Introduction

In this page you can find the example usage for org.apache.hadoop.net NetUtils getCanonicalUri.

Prototype

public static URI getCanonicalUri(URI uri, int defaultPort) 

Source Link

Document

Resolve the uri's hostname and add the default port if not in the uri

Usage

From source file:com.bigstep.datalake.DLFileSystem.java

License:Apache License

@Override
protected URI canonicalizeUri(URI uri) {
    return NetUtils.getCanonicalUri(uri, getDefaultPort());
}

From source file:com.mellanox.r4h.DistributedFileSystem.java

License:Apache License

@Override
protected URI canonicalizeUri(URI uri) {
    if (HAUtil.isLogicalUri(getConf(), uri)) {
        // Don't try to DNS-resolve logical URIs, since the 'authority'
        // portion isn't a proper hostname
        return uri;
    } else {//from  w  w  w . ja va  2 s  .com
        return NetUtils.getCanonicalUri(uri, getDefaultPort());
    }
}