Class HiveSyncTool
- java.lang.Object
-
- net.snowflake.hivemetastoreconnector.core.HiveSyncTool
-
public class HiveSyncTool extends Object
Utility class for syncing metadata from Hive to Snowflake- Author:
- wwong
-
-
Constructor Summary
Constructors Constructor Description HiveSyncTool(org.apache.hadoop.hive.metastore.HiveMetaStoreClient hmsClient)Instantiates the HiveSyncTool.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)A convenient entry point for the sync tool.voidsync()Does a one-time, one-way metadata sync from the Hive metastore to Snowflake.
-
-
-
Method Detail
-
sync
public void sync() throws org.apache.thrift.TExceptionDoes a one-time, one-way metadata sync from the Hive metastore to Snowflake. 1. Tables in Hive are created in Snowflake 2. Partitions not in Hive are dropped from Snowflake 3. Partitions in Hive are added to Snowflake Note: does not drop tables from Snowflake.- Throws:
org.apache.thrift.TException- thrown when encountering a Thrift exception while communicating with the metastore or executing a metastore operation
-
main
public static void main(String[] args) throws org.apache.thrift.TException
A convenient entry point for the sync tool. Expects Hive and Hadoop libraries to be in the classpath. See also:sync()- Parameters:
args- program arguments, which are not used- Throws:
org.apache.thrift.TException- thrown when encountering a Thrift exception while communicating with the metastore or executing a metastore operation
-
-