public class Utils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Utils.JdbcConnectionParams |
Modifier and Type | Field and Description |
---|---|
static String |
URL_PREFIX
The required prefix for the connection URL.
|
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static Utils.JdbcConnectionParams |
extractURLComponents(String uri,
Properties info)
This method handles the base parsing of the given jdbc uri.
|
static String |
getCanonicalHostName(String hostName)
Method to get canonical-ized hostname, given a hostname (possibly a CNAME).
|
static String |
getPassword(Map<String,String> confMap,
String key)
Method to get the password from the configuration map if available.
|
static String |
parsePropertyFromUrl(String url,
String key) |
static Utils.JdbcConnectionParams |
parseURL(String uri) |
static Utils.JdbcConnectionParams |
parseURL(String uri,
Properties info)
Parse JDBC connection URL
The new format of the URL is:
jdbc:hive2://<host1>:<port1>,<host2>:<port2>/dbName;sess_var_list?hive_conf_list#hive_var_list
where the optional sess, conf and var lists are semicolon separated <key>=<val> pairs.
|
public static final String URL_PREFIX
public static Utils.JdbcConnectionParams parseURL(String uri) throws JdbcUriParseException, SQLException, ZooKeeperHiveClientException
public static Utils.JdbcConnectionParams parseURL(String uri, Properties info) throws JdbcUriParseException, SQLException, ZooKeeperHiveClientException
uri
- SQLException
JdbcUriParseException
ZooKeeperHiveClientException
public static Utils.JdbcConnectionParams extractURLComponents(String uri, Properties info) throws JdbcUriParseException
uri
- info
- JdbcUriParseException
public static String getCanonicalHostName(String hostName)
hostName
- The hostname to be canonical-ized.Copyright © 2023 The Apache Software Foundation. All rights reserved.