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)
Deprecated.
As of release 1.3/2.1. Replaced by
newConnection(boolean, String) |
StreamingConnection |
newConnection(boolean createPartIfNotExists,
HiveConf conf)
Deprecated.
As of release 1.3/2.1. Replaced by
newConnection(boolean, HiveConf, String) |
StreamingConnection |
newConnection(boolean createPartIfNotExists,
HiveConf conf,
String agentInfo)
Acquire a new connection to MetaStore for streaming
|
StreamingConnection |
newConnection(boolean createPartIfNotExists,
HiveConf conf,
org.apache.hadoop.security.UserGroupInformation authenticatedUser)
Deprecated.
As of release 1.3/2.1. Replaced by
newConnection(boolean, HiveConf, UserGroupInformation, String) |
StreamingConnection |
newConnection(boolean createPartIfNotExists,
HiveConf conf,
org.apache.hadoop.security.UserGroupInformation authenticatedUser,
String agentInfo)
Acquire a new connection to MetaStore for streaming.
|
StreamingConnection |
newConnection(boolean createPartIfNotExists,
String agentInfo)
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
newConnection(boolean, String)
public StreamingConnection newConnection(boolean createPartIfNotExists, HiveConf conf) throws ConnectionError, InvalidPartition, InvalidTable, PartitionCreationFailed, ImpersonationFailed, InterruptedException
newConnection(boolean, HiveConf, String)
public StreamingConnection newConnection(boolean createPartIfNotExists, HiveConf conf, org.apache.hadoop.security.UserGroupInformation authenticatedUser) throws ConnectionError, InvalidPartition, InvalidTable, PartitionCreationFailed, ImpersonationFailed, InterruptedException
newConnection(boolean, HiveConf, UserGroupInformation, String)
public StreamingConnection newConnection(boolean createPartIfNotExists, String agentInfo) throws ConnectionError, InvalidPartition, InvalidTable, PartitionCreationFailed, ImpersonationFailed, InterruptedException
createPartIfNotExists
- If true, the partition specified in the endpoint
will be auto created if it does not existagentInfo
- should uniquely identify the process/entity that is using this batch. This
should be something that can be correlated with calling application log files
and/or monitoring consoles.ConnectionError
- if problem connectingInvalidPartition
- if specified partition is not valid (createPartIfNotExists = false)ImpersonationFailed
- if not able to impersonate 'proxyUser'PartitionCreationFailed
- if failed to create partitionInterruptedException
InvalidTable
public StreamingConnection newConnection(boolean createPartIfNotExists, HiveConf conf, String agentInfo) 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.agentInfo
- should uniquely identify the process/entity that is using this batch. This
should be something that can be correlated with calling application log files
and/or monitoring consoles.ConnectionError
- if problem connectingInvalidPartition
- if specified partition is not valid (createPartIfNotExists = false)ImpersonationFailed
- if not able to impersonate 'proxyUser'PartitionCreationFailed
- if failed to create partitionInterruptedException
InvalidTable
public StreamingConnection newConnection(boolean createPartIfNotExists, HiveConf conf, org.apache.hadoop.security.UserGroupInformation authenticatedUser, String agentInfo) 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.agentInfo
- should uniquely identify the process/entity that is using this batch. This
should be something that can be correlated with calling application log files
and/or monitoring consoles.ConnectionError
- if there is a connection problemInvalidPartition
- if specified partition is not valid (createPartIfNotExists = false)ImpersonationFailed
- if not able to impersonate 'username'PartitionCreationFailed
- if failed to create partitionInterruptedException
InvalidTable
Copyright © 2016 The Apache Software Foundation. All rights reserved.