Connecting to Hadoop using the Zookeeper Discovery Mode connection string


In SAS/ACCESS® Interface to Hadoop, you can use the URI= option to specify the connection string when using Zookeeper Discovery Mode. Here are examples:

libname HD hadoop uri="jdbc:hive2://hdp-zk-1.sas.com:2181,hdp-zk-2.sas.com:2181,
hdp-zk-3.sas.com:2181/;serviceDiscoveryMode=zooKeeper;
zooKeeperNamespace=hiveserver2-ranger" server='hdp-zk-1.sas.com' ;
proc sql;
connect to hadoop (uri="jdbc:hive2://hdp-zk-1.sas.com:2181,hdp-zk-2.sas.com:2181,
hdp-zk-3.sas.com:2181/;serviceDiscoveryMode=zooKeeper;
zooKeeperNamespace=hiveserver2-ranger" server='hdp-zk-1.sas.com' ) ;

When you use this method, make sure that there are no embedded spaces or unprintable characters within the connection string. If the connection string within the URI= option becomes too long for a single line, be sure to break the line by pressing the Enter key after a comma or semicolon.

Note: The LIBNAME connection to Hadoop requires that you specify a SERVER= option outside of the URI string.