You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Vijay Singh (JIRA)" <ji...@apache.org> on 2016/05/22 07:22:12 UTC

[jira] [Commented] (HIVE-13817) Allow DNS CNAME ALIAS Resolution from apache hive beeline JDBC URL to allow for failover

    [ https://issues.apache.org/jira/browse/HIVE-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295442#comment-15295442 ] 

Vijay Singh commented on HIVE-13817:
------------------------------------


{panel:title=Test Setup for CNAME alias resolution to A record based on reverse dns lookup |borderStyle=dashed|borderColor=#ccd|titleBGColor=#F0D6C1|bgColor=#BBAFCE}
[ec2-user@ip-10-0-0-18 ~]$ nslookup testcnamerecord.gce.cloudera.com
Server:		10.0.0.11
Address:	10.0.0.11#53

testcnamerecord.gce.cloudera.com	canonical name = testarecord.gce.cloudera.com.
Name:	testarecord.gce.cloudera.com
Address: 10.0.0.19

[ec2-user@ip-10-0-0-18 ~]$ java NSLookupFwd testcnamerecord.gce.cloudera.com
Host: testcnamerecord.gce.cloudera.com
Canonical HostName: testarecord.gce.cloudera.com
{panel}

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

{code:title= NSLookupFwd.java|borderStyle=solid}
[ec2-user@ip-10-0-0-18 ~]$ cat NSLookupFwd.java 
import java.net.InetAddress;
import java.net.UnknownHostException;
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: " +
          host);
      System.out.println("Canonical HostName: " +
          cname);
    } 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]);
  }
}
{code}

> Allow DNS CNAME ALIAS Resolution from apache hive beeline JDBC URL to allow for failover
> ----------------------------------------------------------------------------------------
>
>                 Key: HIVE-13817
>                 URL: https://issues.apache.org/jira/browse/HIVE-13817
>             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
(v6.3.4#6332)