hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vijay Singh (JIRA)" <>
Subject [jira] [Commented] (HIVE-13817) Allow DNS CNAME ALIAS Resolution from apache hive beeline JDBC URL to allow for failover
Date Sun, 22 May 2016 07:22:12 GMT


Vijay Singh commented on HIVE-13817:

{panel:title=Test Setup for CNAME alias resolution to A record based on reverse dns lookup
[ec2-user@ip-10-0-0-18 ~]$ nslookup
Address:	canonical name =

[ec2-user@ip-10-0-0-18 ~]$ java NSLookupFwd
Canonical HostName:

Please find the code snippet  for above app that successfully performs CNAME alias to A record
resolution based on reverse dns lookup. 

[ec2-user@ip-10-0-0-18 ~]$ cat 
import java.util.logging.Level;
import java.util.logging.Logger;

public class NSLookupFwd
   public String canonicalize(String host) {
    String cname=null;
    try {
      cname = InetAddress.getByName(host).getCanonicalHostName();
      System.out.println("Host: " +
      System.out.println("Canonical HostName: " +
    } catch (UnknownHostException ex) {
      Logger.getLogger(NSLookupFwd.class.getName()).log(Level.SEVERE, null, ex);
    return cname;
  public static void main(String[] args)
    new NSLookupFwd().canonicalize(args[0]);

> Allow DNS CNAME ALIAS Resolution from apache hive beeline JDBC URL to allow for failover
> ----------------------------------------------------------------------------------------
>                 Key: HIVE-13817
>                 URL:
>             Project: Hive
>          Issue Type: New Feature
>          Components: Beeline
>    Affects Versions: 1.2.1
>            Reporter: Vijay Singh
>         Attachments: HIVE-13817.1.patch
>   Original Estimate: 24h
>  Remaining Estimate: 24h
> Currently, in case of BDR clusters, DNS CNAME alias based connections fail. As _HOST
resolves to exact endpoint specified in connection string and that may not be intended SPN
for kerberos based on reverse DNS lookup. Consequently this JIRA proposes that client specific
setting be used to resolv _HOST from CNAME DNS alias to A record entry on the fly in beeline.

This message was sent by Atlassian JIRA

View raw message