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

2017-09-02 Thread Vijay Singh (JIRA)

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

Vijay Singh commented on HIVE-13817:


It appears that Hive-17218 has implemented the same logic for fixing this issue 
recently, So good news is no patch may be required in this case for Canonical 
name resolution.

> 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, HIVE-13817.2.patch, 
> HIVE-13817.3.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.4.14#64029)


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

2017-09-01 Thread Vijay Singh (JIRA)

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

Vijay Singh commented on HIVE-13817:


Will rebase the patch as asked. Next ETA for patch is 09/03/17

> 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, HIVE-13817.2.patch, 
> HIVE-13817.3.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.4.14#64029)


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

2016-05-22 Thread Vijay Singh (JIRA)

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

Vijay Singh commented on HIVE-13817:


Also verified that hive2 action invoked from oozie workflow with CNAME alias 
string and useCanonicalName=true successfully obtains delegationtokens and 
executes the workflow. Please see invocation and verfication log excerpts.
{code}
[root@vjd-1 hive2]# cat hive2job.properties 
nameNode=hdfs://vjd-1.gce.cloudera.com:8020
jobTracker=yarnRM
queueName=default
jdbcURL=jdbc:hive2://vjlb.gce.cloudera.com:1/default;useCanonicalName=true;
jdbcPrincipal=hive/_h...@gce.cloudera.com
examplesRoot=/testproject/code/examplesoozie

oozie.use.system.libpath=true

oozie.wf.application.path=${nameNode}${examplesRoot}/hive2
[root@vjd-1 hive2]# cat workflow.xml 




hive2.server.principal
${jdbcPrincipal}


hive2.jdbc.url
${jdbcURL}







${jobTracker}
${nameNode}






mapred.job.queue.name
${queueName}


${jdbcURL}
script.q
INPUT=${examplesRoot}/input-data/table
OUTPUT=${examplesRoot}/output-data/hive2






Hive2 (Beeline) action failed, error 
message[${wf:errorMessage(wf:lastErrorNode())}]



[root@vjd-1 hive2]# oozie job -oozie 
http://vjtest-local.gce.cloudera.com:11000/oozie -config hive2job.properties 
-run
job: 041-16052507746-oozie-oozi-W
[root@vjd-1 hive2]#  oozie job -oozie 
http://vjtest-local.gce.cloudera.com:11000/oozie -info 
041-16052507746-oozie-oozi-W 
Job ID : 041-16052507746-oozie-oozi-W

Workflow Name : hive2-wf
App Path  : 
hdfs://vjd-1.gce.cloudera.com:8020/testproject/code/examplesoozie/hive2
Status: SUCCEEDED
Run   : 0
User  : vijay
Group : -
Created   : 2016-05-23 05:38 GMT
Started   : 2016-05-23 05:38 GMT
Last Modified : 2016-05-23 05:38 GMT
Ended : 2016-05-23 05:38 GMT
CoordAction ID: -

Actions

ID
StatusExt ID Ext Status Err Code  

041-16052507746-oozie-oozi-W@:start:  
OK-  OK - 

041-16052507746-oozie-oozi-W@hive2-node   
OKjob_1463802572747_0018 SUCCEEDED  - 

041-16052507746-oozie-oozi-W@end  
OK-  OK - 


[root@vjd-1 hive2]# cat script.q
DROP TABLE IF EXISTS test;
SELECT * FROM sample_07;
[root@vjd-1 hive2]# 
{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, HIVE-13817.2.patch, 
> HIVE-13817.3.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)


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

2016-05-22 Thread Vijay Singh (JIRA)

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

Vijay Singh commented on HIVE-13817:


Also ran the same tests with impala using modified jdbc driver and SSL turned 
on successfully.
{code}
[root@vjd-1 ~]# beeline -u 
"jdbc:hive2://vjlb.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true"
 -e "show tables;"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated 
and will likely be removed in a future release
16/05/22 13:02:47 WARN mapreduce.TableMapReduceUtil: The hbase-prefix-tree 
module jar containing PrefixTreeCodec is not present.  Continuing without it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
scan complete in 2ms
Connecting to 
jdbc:hive2://vjlb.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true
Error: Could not open client transport with JDBC Uri: 
jdbc:hive2://vjlb.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true:
 null (state=08S01,code=0)
No current connection
Error: Could not open client transport with JDBC Uri: 
jdbc:hive2://vjlb.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true:
 null (state=08S01,code=0)
[root@vjd-1 ~]# beeline -u 
"jdbc:hive2://vjtest-local.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true"
 -e "show tables;"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated 
and will likely be removed in a future release
16/05/22 13:03:16 WARN mapreduce.TableMapReduceUtil: The hbase-prefix-tree 
module jar containing PrefixTreeCodec is not present.  Continuing without it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
scan complete in 2ms
Connecting to 
jdbc:hive2://vjtest-local.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true
Connected to: Impala (version 2.5.0-cdh5.7.0)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
customers
sample_07
sample_08
web_logs
+---+--+
| name  |
+---+--+
+---+--+
No rows selected (2.014 seconds)
Beeline version 1.1.0-cdh5.7.0 by Apache Hive
Closing: 0: 
jdbc:hive2://vjtest-local.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true
[root@vjd-1 ~]# beeline -u 
"jdbc:hive2://vjtest-local.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true;useCanonicalName=true"
 -e "show tables;"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated 
and will likely be removed in a future release
16/05/22 13:03:42 WARN mapreduce.TableMapReduceUtil: The hbase-prefix-tree 
module jar containing PrefixTreeCodec is not present.  Continuing without it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
scan complete in 2ms
Connecting to 
jdbc:hive2://vjtest-local.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true;useCanonicalName=true
Connected to: Impala (version 2.5.0-cdh5.7.0)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
customers
sample_07
sample_08
web_logs
+---+--+
| name  |
+---+--+
+---+--+
No rows selected (2.027 seconds)
Beeline version 1.1.0-cdh5.7.0 by Apache Hive
Closing: 0: 
jdbc:hive2://vjtest-local.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true;useCanonicalName=true
[root@vjd-1 ~]# beeline -u 
"jdbc:hive2://vjlb.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true;useCanonicalName=true"
 -e "show tables;"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated 
and will likely be removed in a future release
16/05/22 13:04:05 WARN mapreduce.TableMapReduceUtil: The hbase-prefix-tree 
module jar containing PrefixTreeCodec is not present.  Continuing without it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
scan complete in 2ms
Connecting to 
jdbc:hive2://vjlb.gce.cloudera.com:21050/default;principal=impala/_h...@gce.cloudera.com;ssl=true;useCanonicalName=true
Connected to: Impala (version 2.5.0-cdh5.7.0)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
customers
sample_07
sample_08
web_logs
+---+--+
| 

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

2016-05-22 Thread Vijay Singh (JIRA)

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

Vijay Singh edited comment on HIVE-13817 at 5/22/16 8:35 AM:
-

The last combination, where we use Canonicalname and canonicalname resolution 
is turned on in connect string has been pasted below for reference as well.
{code}
[root@vjd-1 ~]# beeline -u 
"jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true"
 -e "show tables;"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated 
and will likely be removed in a future release
16/05/22 01:33:24 WARN mapreduce.TableMapReduceUtil: The hbase-prefix-tree 
module jar containing PrefixTreeCodec is not present.  Continuing without it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
scan complete in 2ms
Connecting to 
jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true
Connected to: Apache Hive (version 1.1.0-cdh5.7.0)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
INFO  : Compiling 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb): show 
tables
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, 
type:string, comment:from deserializer)], properties:null)
INFO  : Completed compiling 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb); Time 
taken: 0.07 seconds
INFO  : Executing 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb): show 
tables
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb); Time 
taken: 0.135 seconds
INFO  : OK
++--+
|  tab_name  |
++--+
| customers  |
| sample_07  |
| sample_08  |
| web_logs   |
++--+
4 rows selected (0.357 seconds)
Beeline version 1.1.0-cdh5.7.0 by Apache Hive
Closing: 0: 
jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true
[root@vjd-1 ~]# 
{code}



was (Author: singhvjd):
The last combination, where we use Canonicalname and canonicalname resolution 
is turned on in connect string has been pasted below for reference as well.
{code}
Closing: 0: 
jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com
[root@vjd-1 ~]# beeline -u 
"jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true"
 -e "show tables;"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated 
and will likely be removed in a future release
16/05/22 01:33:24 WARN mapreduce.TableMapReduceUtil: The hbase-prefix-tree 
module jar containing PrefixTreeCodec is not present.  Continuing without it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
scan complete in 2ms
Connecting to 
jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true
Connected to: Apache Hive (version 1.1.0-cdh5.7.0)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
INFO  : Compiling 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb): show 
tables
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, 
type:string, comment:from deserializer)], properties:null)
INFO  : Completed compiling 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb); Time 
taken: 0.07 seconds
INFO  : Executing 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb): show 
tables
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb); Time 
taken: 0.135 seconds
INFO  : OK
++--+
|  tab_name  |
++--+
| customers  |
| sample_07  |
| sample_08  |
| web_logs   |
++--+
4 rows selected (0.357 seconds)
Beeline version 1.1.0-cdh5.7.0 by Apache Hive
Closing: 0: 
jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true
[root@vjd-1 ~]# 
{code}


> Allow DNS CNAME ALIAS Resolution from apache hive beeline JDBC URL to allow 
> for failover
> 
>
>

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

2016-05-22 Thread Vijay Singh (JIRA)

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

Vijay Singh commented on HIVE-13817:


The last combination, where we use Canonicalname and canonicalname resolution 
is turned on in connect string has been pasted below for reference as well.
{code}
Closing: 0: 
jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com
[root@vjd-1 ~]# beeline -u 
"jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true"
 -e "show tables;"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated 
and will likely be removed in a future release
16/05/22 01:33:24 WARN mapreduce.TableMapReduceUtil: The hbase-prefix-tree 
module jar containing PrefixTreeCodec is not present.  Continuing without it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
scan complete in 2ms
Connecting to 
jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true
Connected to: Apache Hive (version 1.1.0-cdh5.7.0)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
INFO  : Compiling 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb): show 
tables
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, 
type:string, comment:from deserializer)], properties:null)
INFO  : Completed compiling 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb); Time 
taken: 0.07 seconds
INFO  : Executing 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb): show 
tables
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing 
command(queryId=hive_2016052201_cd09f83a-5ce1-4cf9-8a3b-9175b00ed4bb); Time 
taken: 0.135 seconds
INFO  : OK
++--+
|  tab_name  |
++--+
| customers  |
| sample_07  |
| sample_08  |
| web_logs   |
++--+
4 rows selected (0.357 seconds)
Beeline version 1.1.0-cdh5.7.0 by Apache Hive
Closing: 0: 
jdbc:hive2://vjtest-local.gce.cloudera.com:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true
[root@vjd-1 ~]# 
{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, HIVE-13817.2.patch, 
> HIVE-13817.3.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)


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

2016-05-22 Thread Vijay Singh (JIRA)

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

Vijay Singh commented on HIVE-13817:


Please see the following SPN values available to HiveServer2.
{code}
[root@vjd-1 ~]# klist -kt 
/var/run/cloudera-scm-agent/process/2121-hive-HIVESERVER2/hive.keytab 
Keytab name: 
FILE:/var/run/cloudera-scm-agent/process/2121-hive-HIVESERVER2/hive.keytab
KVNO Timestamp   Principal
 --- --
   1 05/22/2016 01:07:19 hive/vjtest-local.gce.cloudera@gce.cloudera.com
   1 05/22/2016 01:07:19 hive/vjtest-local.gce.cloudera@gce.cloudera.com
   1 05/22/2016 01:07:19 hive/vjtest-local.gce.cloudera@gce.cloudera.com
   1 05/22/2016 01:07:19 hive/vjd-1.gce.cloudera@gce.cloudera.com
   1 05/22/2016 01:07:19 hive/vjd-1.gce.cloudera@gce.cloudera.com
   1 05/22/2016 01:07:19 hive/vjd-1.gce.cloudera@gce.cloudera.com
   1 05/22/2016 01:07:19 HTTP/vjd-1.gce.cloudera@gce.cloudera.com
   1 05/22/2016 01:07:19 HTTP/vjd-1.gce.cloudera@gce.cloudera.com
   1 05/22/2016 01:07:19 HTTP/vjd-1.gce.cloudera@gce.cloudera.com
{code}
Please see the following program that determines canonical name.
{code}
[root@vjd-1 ~]# java NSLookupFwd vjlb
Host: vjlb
Canonical HostName: vjtest-local.gce.cloudera.com
{code}

Please find the log excerpt from executing beeline with new driver with cname 
alias functionality turned on in connection string.
{code}
[root@vjd-1 ~]# hadoop version
Hadoop 2.6.0-cdh5.7.0
Subversion http://github.com/cloudera/hadoop -r 
c00978c67b0d3fe9f3b896b5030741bd40bf541a
Compiled by jenkins on 2016-03-23T18:36Z
Compiled with protoc 2.5.0
>From source with checksum b2eabfa328e763c88cb14168f9b372
This command was run using 
/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/jars/hadoop-common-2.6.0-cdh5.7.0.jar
[root@vjd-1 ~]# beeline -u 
"jdbc:hive2://vjlb:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true"
 -e "show tables;"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated 
and will likely be removed in a future release
16/05/22 01:14:45 WARN mapreduce.TableMapReduceUtil: The hbase-prefix-tree 
module jar containing PrefixTreeCodec is not present.  Continuing without it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
scan complete in 2ms
Connecting to 
jdbc:hive2://vjlb:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true
Connected to: Apache Hive (version 1.1.0-cdh5.7.0)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
INFO  : Compiling 
command(queryId=hive_20160522011414_690deeda-df58-469d-b18f-33890162cf6f): show 
tables
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, 
type:string, comment:from deserializer)], properties:null)
INFO  : Completed compiling 
command(queryId=hive_20160522011414_690deeda-df58-469d-b18f-33890162cf6f); Time 
taken: 0.069 seconds
INFO  : Executing 
command(queryId=hive_20160522011414_690deeda-df58-469d-b18f-33890162cf6f): show 
tables
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing 
command(queryId=hive_20160522011414_690deeda-df58-469d-b18f-33890162cf6f); Time 
taken: 0.163 seconds
INFO  : OK
++--+
|  tab_name  |
++--+
| customers  |
| sample_07  |
| sample_08  |
| web_logs   |
++--+
4 rows selected (0.376 seconds)
Beeline version 1.1.0-cdh5.7.0 by Apache Hive
Closing: 0: 
jdbc:hive2://vjlb:1/default;principal=hive/_h...@gce.cloudera.com;useCanonicalName=true
[root@vjd-1 ~]#
{code}

Please find the log excerpt for connection without canonical name functionality 
turned on in connection string.
{code}
[root@vjd-1 ~]# beeline -u 
"jdbc:hive2://vjlb:1/default;principal=hive/_h...@gce.cloudera.com" -e 
"show tables;"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated 
and will likely be removed in a future release
16/05/22 01:20:41 WARN mapreduce.TableMapReduceUtil: The hbase-prefix-tree 
module jar containing PrefixTreeCodec is not present.  Continuing without it.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
support was removed in 8.0
scan complete in 3ms
Connecting to 
jdbc:hive2://vjlb:1/default;principal=hive/_h...@gce.cloudera.com
16/05/22 01:20:43 [main]: ERROR transport.TSaslTransport: SASL negotiation 
failure
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: 
No valid credentials provided (Mechanism level: Server not found in Kerberos 

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

2016-05-22 Thread Vijay Singh (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vijay Singh updated HIVE-13817:
---
Attachment: HIVE-13817.3.patch

Modified for NullPointerException for 3rd patch since SessionMap is required 
for Determining Canonical PAram.

> 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, HIVE-13817.2.patch, 
> HIVE-13817.3.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)


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

2016-05-22 Thread Vijay Singh (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vijay Singh updated HIVE-13817:
---
Attachment: HIVE-13817.2.patch

Made changes to incorrect if else logic for CanonicalName property.

> 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, HIVE-13817.2.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)


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

2016-05-22 Thread Vijay Singh (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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.comcanonical 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)


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

2016-05-21 Thread Vijay Singh (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vijay Singh updated HIVE-13817:
---
Release Note: Hive JDBC driver is modified to support use of canonical name 
in environments where CNAME alias is used infront of DR cluster switch. The 
_HOST part of principal should take care of principal name changes as long as  
VIP points to Load balancer A Record.
  Status: Patch Available  (was: Open)

Please review and provide feedback if any.

> 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)


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

2016-05-21 Thread Vijay Singh (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vijay Singh updated HIVE-13817:
---
Attachment: HIVE-13817.1.patch

Please review

> 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)


[jira] [Updated] (HIVE-8554) Hive Server 2 should support multiple authentication types at the same time

2016-02-24 Thread Vijay Singh (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-8554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vijay Singh updated HIVE-8554:
--
Assignee: (was: Vijay Singh)

> Hive Server 2 should support multiple authentication types at the same time
> ---
>
> Key: HIVE-8554
> URL: https://issues.apache.org/jira/browse/HIVE-8554
> Project: Hive
>  Issue Type: Bug
>Reporter: Joey Echeverria
>
> It's very common for clusters to use LDAP/Active Directory as an identity 
> provider for a cluster while using Kerberos authentication. It would be 
> useful if users could seamlessly switch between using LDAP username/password 
> authentication and Kerberos authentication without having to run multiple 
> Hive Server 2 instances.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (HIVE-8554) Hive Server 2 should support multiple authentication types at the same time

2016-02-24 Thread Vijay Singh (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-8554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vijay Singh reassigned HIVE-8554:
-

Assignee: Vijay Singh

> Hive Server 2 should support multiple authentication types at the same time
> ---
>
> Key: HIVE-8554
> URL: https://issues.apache.org/jira/browse/HIVE-8554
> Project: Hive
>  Issue Type: Bug
>Reporter: Joey Echeverria
>Assignee: Vijay Singh
>
> It's very common for clusters to use LDAP/Active Directory as an identity 
> provider for a cluster while using Kerberos authentication. It would be 
> useful if users could seamlessly switch between using LDAP username/password 
> authentication and Kerberos authentication without having to run multiple 
> Hive Server 2 instances.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)