org.apache.hadoop.hive.ql.metadata
Class HiveMetaStoreChecker

java.lang.Object
  extended by 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
           
 
Constructor Summary
HiveMetaStoreChecker(Hive hive)
           
 
Method Summary
 void checkMetastore(String dbName, String tableName, List<? extends Map<String,String>> partitions, CheckResult result)
          Check the metastore for inconsistencies, data missing in either the metastore or on the dfs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

HiveMetaStoreChecker

public HiveMetaStoreChecker(Hive hive)
Method Detail

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 partitions
result - 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.