public class BeelineSiteParser extends Object implements HS2ConnectionFileParser
| Modifier and Type | Field and Description |
|---|---|
static String |
BEELINE_CONNECTION_NAMED_JDBC_URL_PREFIX
Prefix string used for named jdbc uri configs
|
static String |
DEFAULT_BEELINE_SITE_FILE_NAME |
static String |
DEFAULT_BEELINE_SITE_LOCATION |
static String |
DEFAULT_NAMED_JDBC_URL_PROPERTY_KEY
Property key used to provide the default named jdbc uri in the config file
|
static String |
ETC_HIVE_CONF_LOCATION |
BEELINE_CONNECTION_PROPERTY_PREFIX, DEFAULT_DB_PROPERTY_KEY, HIVE_CONF_PROPERTY_KEY, HIVE_VAR_PROPERTY_KEY, HOST_PROPERTY_KEY, URL_PREFIX_PROPERTY_KEY| Constructor and Description |
|---|
BeelineSiteParser() |
| 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
|
Properties |
getConnectionProperties(String propertyValue) |
public static final String BEELINE_CONNECTION_NAMED_JDBC_URL_PREFIX
public static final String DEFAULT_NAMED_JDBC_URL_PROPERTY_KEY
public static final String DEFAULT_BEELINE_SITE_FILE_NAME
public static final String DEFAULT_BEELINE_SITE_LOCATION
public static final String ETC_HIVE_CONF_LOCATION
public Properties getConnectionProperties() throws BeelineSiteParseException
HS2ConnectionFileParserThe 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" ]
getConnectionProperties in interface HS2ConnectionFileParserBeelineSiteParseExceptionpublic Properties getConnectionProperties(String propertyValue) throws BeelineSiteParseException
BeelineSiteParseExceptionpublic boolean configExists()
configExists in interface HS2ConnectionFileParserCopyright © 2019 The Apache Software Foundation. All Rights Reserved.