public class HiveEndPoint extends Object
Modifier and Type | Field and Description |
---|---|
String |
database |
String |
metaStoreUri |
ArrayList<String> |
partitionVals |
String |
table |
Constructor and Description |
---|
HiveEndPoint(String metaStoreUri,
String database,
String table,
List<String> partitionVals) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
StreamingConnection |
newConnection(boolean createPartIfNotExists)
Acquire a new connection to MetaStore for streaming
|
StreamingConnection |
newConnection(boolean createPartIfNotExists,
HiveConf conf)
Acquire a new connection to MetaStore for streaming
|
StreamingConnection |
newConnection(boolean createPartIfNotExists,
HiveConf conf,
org.apache.hadoop.security.UserGroupInformation authenticatedUser)
Acquire a new connection to MetaStore for streaming.
|
String |
toString() |
public final String metaStoreUri
public final String database
public final String table
public HiveEndPoint(String metaStoreUri, String database, String table, List<String> partitionVals)
metaStoreUri
- URI of the metastore to connect to eg: thrift://localhost:9083database
- Name of the Hive databasetable
- Name of table to stream topartitionVals
- Indicates the specific partition to stream to. Can be null or empty List
if streaming to a table without partitions. The order of values in this
list must correspond exactly to the order of partition columns specified
during the table creation. E.g. For a table partitioned by
(continent string, country string), partitionVals could be the list
("Asia", "India").public StreamingConnection newConnection(boolean createPartIfNotExists) throws ConnectionError, InvalidPartition, InvalidTable, PartitionCreationFailed, ImpersonationFailed, InterruptedException
createPartIfNotExists
- If true, the partition specified in the endpoint
will be auto created if it does not existConnectionError
- if problem connectingInvalidPartition
- if specified partition is not valid (createPartIfNotExists = false)ImpersonationFailed
- if not able to impersonate 'proxyUser'IOException
- if there was an I/O error when acquiring connectionPartitionCreationFailed
- if failed to create partitionInterruptedException
InvalidTable
public StreamingConnection newConnection(boolean createPartIfNotExists, HiveConf conf) throws ConnectionError, InvalidPartition, InvalidTable, PartitionCreationFailed, ImpersonationFailed, InterruptedException
createPartIfNotExists
- If true, the partition specified in the endpoint
will be auto created if it does not existconf
- HiveConf object, set it to null if not using advanced hive settings.ConnectionError
- if problem connectingInvalidPartition
- if specified partition is not valid (createPartIfNotExists = false)ImpersonationFailed
- if not able to impersonate 'proxyUser'IOException
- if there was an I/O error when acquiring connectionPartitionCreationFailed
- if failed to create partitionInterruptedException
InvalidTable
public StreamingConnection newConnection(boolean createPartIfNotExists, HiveConf conf, org.apache.hadoop.security.UserGroupInformation authenticatedUser) throws ConnectionError, InvalidPartition, InvalidTable, PartitionCreationFailed, ImpersonationFailed, InterruptedException
createPartIfNotExists
- If true, the partition specified in the endpoint
will be auto created if it does not existconf
- HiveConf object to be used for the connection. Can be null.authenticatedUser
- UserGroupInformation object obtained from successful authentication.
Uses non-secure mode if this argument is null.ConnectionError
- if there is a connection problemInvalidPartition
- if specified partition is not valid (createPartIfNotExists = false)ImpersonationFailed
- if not able to impersonate 'username'IOException
- if there was an I/O error when acquiring connectionPartitionCreationFailed
- if failed to create partitionInterruptedException
InvalidTable
Copyright © 2017 The Apache Software Foundation. All rights reserved.