HCatClient API can be used for many Hive related functions like -
- Create/Drop Hive schemas/tables.
- Update Hive table schema.
- Add/Drop Partitions.
- Update Table name.
Driver API can be used to -
- Execute Hive query.
- Get query plan.
The below program illustrates the use of HCatClient to create a database and create a table -
Now we can modify the above table schema using HCatClient -
Now we can use Driver API to drop table and database