Is there a function in HiveMetaStoreClient which will give me all Partitions of a hive-table?

Viewed 115

I have tried some functions like getPartition, getPartitionsByNames, listPartitions. I need something like if i give the name of a partition column, then the function should return all the partitions of it existing in hdfs.

Example: Function(dbName, tableName, partitonColumnName) Output: 12345, 12346, 12347, 12348 It should return all partitions existing in hdfs

1 Answers

HiveMetastoreClient has List<String> listPartitionNames(String dbName, String tblName, short max) method and List<Partition> listPartitions(String db_name, String tbl_name, short max_parts) method.

See listPartitions method.

Related