Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.util.MetaStoreUtil Class Reference
Collaboration diagram for com.cloudera.impala.util.MetaStoreUtil:

Static Public Member Functions

static List
< org.apache.hadoop.hive.metastore.api.Partition > 
fetchAllPartitions (HiveMetaStoreClient client, String dbName, String tblName, int numRetries) throws MetaException, TException
 
static List< Partition > fetchPartitionsByName (HiveMetaStoreClient client, List< String > partNames, String dbName, String tblName) throws MetaException, TException
 

Static Package Functions

 [static initializer]
 

Static Private Attributes

static final Logger LOG = Logger.getLogger(MetaStoreUtil.class)
 
static final short DEFAULT_MAX_PARTITIONS_PER_RPC = 1000
 
static short maxPartitionsPerRpc_ = DEFAULT_MAX_PARTITIONS_PER_RPC
 

Detailed Description

Utility methods for interacting with the Hive Metastore.

Definition at line 33 of file MetaStoreUtil.java.

Member Function Documentation

com.cloudera.impala.util.MetaStoreUtil.[static initializer] ( )
inlinestaticpackage
static List<org.apache.hadoop.hive.metastore.api.Partition> com.cloudera.impala.util.MetaStoreUtil.fetchAllPartitions ( HiveMetaStoreClient  client,
String  dbName,
String  tblName,
int  numRetries 
) throws MetaException, TException
inlinestatic

Fetches all partitions for a table in batches, with each batch containing at most 'maxPartsPerRpc' partitions. Returns a List containing all fetched Partitions. Will throw a MetaException if existing partitions are dropped while a fetch is in progress. To help protect against this, the operation can be retried if there is a MetaException by setting the "numRetries" parameter. Failures due to thrift exceptions (TExceptions) are not retried because they generally mean the connection is broken or has timed out. The HiveClient supports configuring retires at the connection level so it can be enabled independently.

Definition at line 75 of file MetaStoreUtil.java.

static List<Partition> com.cloudera.impala.util.MetaStoreUtil.fetchPartitionsByName ( HiveMetaStoreClient  client,
List< String >  partNames,
String  dbName,
String  tblName 
) throws MetaException, TException
inlinestatic

Given a List of partition names, fetches the matching Partitions from the HMS in batches. Each batch will contain at most 'maxPartsPerRpc' partitions. Returns a List containing all fetched Partitions. Will throw a MetaException if any partitions in 'partNames' do not exist.

Definition at line 106 of file MetaStoreUtil.java.

References com.cloudera.impala.util.MetaStoreUtil.maxPartitionsPerRpc_.

Member Data Documentation

final short com.cloudera.impala.util.MetaStoreUtil.DEFAULT_MAX_PARTITIONS_PER_RPC = 1000
staticprivate

Definition at line 38 of file MetaStoreUtil.java.

final Logger com.cloudera.impala.util.MetaStoreUtil.LOG = Logger.getLogger(MetaStoreUtil.class)
staticprivate

Definition at line 34 of file MetaStoreUtil.java.

short com.cloudera.impala.util.MetaStoreUtil.maxPartitionsPerRpc_ = DEFAULT_MAX_PARTITIONS_PER_RPC
staticprivate

The documentation for this class was generated from the following file: