public class HiveSiteHS2ConnectionFileParser extends Object implements HS2ConnectionFileParser
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 |
---|
HiveSiteHS2ConnectionFileParser() |
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
|
public Properties getConnectionProperties() throws BeelineHS2ConnectionFileParseException
HS2ConnectionFileParser
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" ]
getConnectionProperties
in interface HS2ConnectionFileParser
BeelineHS2ConnectionFileParseException
- if there is invalid key with appropriate messagepublic boolean configExists()
configExists
in interface HS2ConnectionFileParser
Copyright © 2021 The Apache Software Foundation. All rights reserved.