Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mesmacosta/hive-custom-hook

Example on how to implement a hive hook
https://github.com/mesmacosta/hive-custom-hook

hadoop hive hive-hook java metadata-extraction

Last synced: 2 days ago
JSON representation

Example on how to implement a hive hook

Awesome Lists containing this project

README

        

# hive-custom-hook
Example on how to implement a hive hook

## Build jar with dependencies
```bash
mvn assembly:assembly
```

## Register your hook in Hive (Permanently, stays even if you restart)
```bash
# Open the file
vi /opt/hive/conf/hive-env.sh

# At the end of the file, add the line and save:
export HIVE_AUX_JARS_PATH=/hive-custom-hook-1.0-SNAPSHOT-jar-with-dependencies.jar

# Open the file
vi /opt/hive/conf/hive-site.xml

# Add the tag before the closing configuration tag and save:
hive.exec.post.hookscom.medium.hive.hook.CustomHook

# Restart your Hive server
```

## Register your hook in Hive manually (For testing purposes, if your restart its cleared)
```bash
# Inside your Hive shell, run

ADD JAR /hive-custom-hook-1.0-SNAPSHOT-jar-with-dependencies.jar
set hive.exec.post.hooks=com.medium.hive.hook.CustomHook;

```