public interface HS2ConnectionFileParser
Modifier and Type | Field and Description |
---|---|
static String |
BEELINE_CONNECTION_PROPERTY_PREFIX
prefix string used for the keys
|
static String |
DEFAULT_DB_PROPERTY_KEY
Property key used to provide the default database in the connection URL
|
static String |
HIVE_CONF_PROPERTY_KEY
Property key used to provide the hive configuration key value pairs in the connection URL
|
static String |
HIVE_VAR_PROPERTY_KEY
Property key used to provide the hive variables in the connection URL
|
static String |
HOST_PROPERTY_KEY
Property key used to provide the hosts in the connection URL
|
static String |
URL_PREFIX_PROPERTY_KEY
Property key used to provide the URL prefix for the connection URL
|
Modifier and Type | Method and Description |
---|---|
boolean |
configExists() |
Properties |
getConnectionProperties()
Returns a Java properties object which contain the key value pairs which can be used in the
Beeline connection URL
|
static final String BEELINE_CONNECTION_PROPERTY_PREFIX
static final String URL_PREFIX_PROPERTY_KEY
static final String DEFAULT_DB_PROPERTY_KEY
static final String HOST_PROPERTY_KEY
static final String HIVE_CONF_PROPERTY_KEY
static final String HIVE_VAR_PROPERTY_KEY
Properties getConnectionProperties() throws BeelineHS2ConnectionFileParseException
The properties returned must include url_prefix and hosts
Following are some examples of the URLs and returned properties object
For example :
jdbc:hive2://hs2-instance1.example.com:10000/default;user=hive?hive.cli.print.currentdb=true; hive.cli.print.header=true#hivevar:mytbl=customers;hivevar:mycol=id it should return [ "url_prefix"="jdbc:hive2://", "hosts"="hs2-instance1.example.com:10000", "defaultDB"="default", "user"="hive", "hiveconf"="hive.cli.print.currentdb=true, hive.cli.print.header=true", "hivevar"="hivevar:mytb1=customers, hivevar:mycol=id" ]
BeelineHS2ConnectionFileParseException
- if there is invalid key with appropriate messageboolean configExists()
Copyright © 2021 The Apache Software Foundation. All rights reserved.