org.apache.hadoop.hive.ql.metadata
Class HiveMetaStoreChecker
java.lang.Object
org.apache.hadoop.hive.ql.metadata.HiveMetaStoreChecker
public class HiveMetaStoreChecker
- extends Object
Verify that the information in the metastore matches what is on the
filesystem. Return a CheckResult object containing lists of missing and any
unexpected tables and partitions.
Field Summary |
static org.apache.commons.logging.Log |
LOG
|
LOG
public static final org.apache.commons.logging.Log LOG
HiveMetaStoreChecker
public HiveMetaStoreChecker(Hive hive)
checkMetastore
public void checkMetastore(String dbName,
String tableName,
List<? extends Map<String,String>> partitions,
CheckResult result)
throws HiveException,
IOException
- Check the metastore for inconsistencies, data missing in either the
metastore or on the dfs.
- Parameters:
dbName
- name of the database, if not specified the default will be used.tableName
- Table we want to run the check for. If null we'll check all the
tables in the database.partitions
- List of partition name value pairs, if null or empty check all
partitionsresult
- Fill this with the results of the check
- Throws:
HiveException
- Failed to get required information from the metastore.
IOException
- Most likely filesystem related
Copyright © 2014 The Apache Software Foundation. All rights reserved.