|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.falcon.catalog.AbstractCatalogService
org.apache.falcon.catalog.HiveCatalogService
public class HiveCatalogService
An implementation of CatalogService that uses Hive Meta Store (HCatalog) as the backing Catalog registry.
Constructor Summary | |
---|---|
HiveCatalogService()
|
Method Summary | |
---|---|
boolean |
dropPartitions(String catalogUrl,
String database,
String tableName,
Map<String,String> partitions)
Drops a given partition. |
static org.apache.hcatalog.api.HCatClient |
get(org.apache.falcon.entity.v0.cluster.Cluster cluster)
|
static org.apache.hcatalog.api.HCatClient |
get(String metastoreUrl)
|
CatalogPartition |
getPartition(String catalogUrl,
String database,
String tableName,
Map<String,String> partitionSpec)
Gets the partition. |
boolean |
isAlive(String catalogBaseUrl)
This method checks if the catalog service is alive. |
boolean |
isTableExternal(String catalogUrl,
String database,
String tableName)
Returns if the table is external or not. |
List<CatalogPartition> |
listPartitionsByFilter(String catalogUrl,
String database,
String tableName,
String filter)
List partitions by filter. |
boolean |
tableExists(String catalogUrl,
String database,
String tableName)
This method checks if the given table exists in the catalog. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HiveCatalogService()
Method Detail |
---|
public static org.apache.hcatalog.api.HCatClient get(org.apache.falcon.entity.v0.cluster.Cluster cluster) throws FalconException
FalconException
public static org.apache.hcatalog.api.HCatClient get(String metastoreUrl) throws FalconException
FalconException
public boolean isAlive(String catalogBaseUrl) throws FalconException
AbstractCatalogService
isAlive
in class AbstractCatalogService
catalogBaseUrl
- url for the catalog service
FalconException
- exceptionpublic boolean tableExists(String catalogUrl, String database, String tableName) throws FalconException
AbstractCatalogService
tableExists
in class AbstractCatalogService
catalogUrl
- url for the catalog servicedatabase
- database the table belongs totableName
- tableName to check if it exists
FalconException
- exceptionpublic boolean isTableExternal(String catalogUrl, String database, String tableName) throws FalconException
AbstractCatalogService
isTableExternal
in class AbstractCatalogService
catalogUrl
- url for the catalog servicedatabase
- database the table belongs totableName
- tableName to check if it exists
FalconException
public List<CatalogPartition> listPartitionsByFilter(String catalogUrl, String database, String tableName, String filter) throws FalconException
AbstractCatalogService
listPartitionsByFilter
in class AbstractCatalogService
catalogUrl
- url for the catalog servicedatabase
- database the table belongs totableName
- tableName to check if it existsfilter
- The filter string,
for example "part1 = \"p1_abc\" and part2 <= "\p2_test\"". Filtering can
be done only on string partition keys.
FalconException
public boolean dropPartitions(String catalogUrl, String database, String tableName, Map<String,String> partitions) throws FalconException
AbstractCatalogService
dropPartitions
in class AbstractCatalogService
catalogUrl
- url for the catalog servicedatabase
- database the table belongs totableName
- tableName to check if it existspartitions
- list of partitions as Key=Value pairs
FalconException
public CatalogPartition getPartition(String catalogUrl, String database, String tableName, Map<String,String> partitionSpec) throws FalconException
AbstractCatalogService
getPartition
in class AbstractCatalogService
catalogUrl
- url for the catalog servicedatabase
- database the table belongs totableName
- tableName to check if it existspartitionSpec
- The partition specification, {[col_name,value],[col_name2,value2]}.
All partition-key-values must be specified.
FalconException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |