Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 18, 2020
1 parent 46d5aff commit d30caf4
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 139 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mount_nfs fs-7abd2444.efs.us-east-1.amazonaws.com:/ /mnt/efs
## Available functions
The following set of functions are available at present:
* [spark](docs/spark.md)
* [prometheus](docs/prometheus.md)
* [misc](docs/misc.md)
* [hive](docs/hive.md)
* [hadoop](docs/hadoop.md)
Expand Down
150 changes: 75 additions & 75 deletions docs/hive.md
Original file line number Diff line number Diff line change
@@ -1,166 +1,166 @@
# hive/hiveserver2.sh
# hive/thrift-metastore.sh

Provides functions to start/stop/restart HiveServer2
Provides functions to start/stop/restart thrift metastore server

* [is_hs2_configured()](#ishs2configured)
* [stop_hs2()](#stophs2)
* [start_hs2()](#starths2)
* [restart_hs2()](#restarths2)
* [start_thrift_metastore()](#startthriftmetastore)
* [stop_thrift_metastore()](#stopthriftmetastore)
* [restart_thrift_metastore()](#restartthriftmetastore)


## is_hs2_configured()
## start_thrift_metastore()

Function to check if HiveServer2 is configured
Function to start thrift metastore server

### Example

```bash
if [[ is_hs2_configured ]]; then
# do something here
fi
start_thrift_metastore
```

_Function has no arguments._

### Exit codes

* **0**: If HiveServer2 is configured
* **1**: Otherwise

## stop_hs2()

Function to stop HiveServer2 JVM
## stop_thrift_metastore()

Works on both Hadoop2 and HiveServer2 clusters
Function to stop thrift metastore server

### Example

```bash
stop_hs2
stop_thrift_metastore
```

_Function has no arguments._

## start_hs2()

Function to start HiveServer2 JVM
## restart_thrift_metastore()

Works on both Hadoop2 and HiveServer2 clusters
Function to restart thrift metastore server

### Example

```bash
start_hs2
restart_thrift_metastore
```

_Function has no arguments._

## restart_hs2()
# hive/ranger-client.sh

Function to restart HiveServer2 JVM
Provides function to install Apache Ranger client for Hive

Works on both Hadoop2 and HiveServer2 clusters
* [install_ranger()](#installranger)


## install_ranger()

Install Apache Ranger client for Hive

Currently supported only on AWS
Requires HiveServer2

### Example

```bash
restart_hs2
install_ranger -h example.host -p 6080 -r examplerepo
```

_Function has no arguments._
### Arguments

# hive/thrift-metastore.sh
* -h string Hostname of Ranger admin. Defaults to `localhost`
* -p int Port where Ranger admin is running. Defaults to `6080`
* -r string Name of Ranger repository. Defaults to `hivedev`

Provides functions to start/stop/restart thrift metastore server
# hive/glue-sync.sh

* [start_thrift_metastore()](#startthriftmetastore)
* [stop_thrift_metastore()](#stopthriftmetastore)
* [restart_thrift_metastore()](#restartthriftmetastore)
Provides function to install Hive Glue Catalog Sync Agent

* [install_glue_sync()](#installgluesync)

## start_thrift_metastore()

Function to start thrift metastore server
## install_glue_sync()

Installs Hive Glue Catalog Sync Agent

Requires Hive 2.x
Currently supported only on AWS

### Example

```bash
start_thrift_metastore
install_glue_sync us-east-1
```

_Function has no arguments._
### Arguments

## stop_thrift_metastore()
* **$1** (string): Region for AWS Athena. Defaults to `us-east-1`

Function to stop thrift metastore server
# hive/hiveserver2.sh

### Example
Provides functions to start/stop/restart HiveServer2

```bash
stop_thrift_metastore
```
* [is_hs2_configured()](#ishs2configured)
* [stop_hs2()](#stophs2)
* [start_hs2()](#starths2)
* [restart_hs2()](#restarths2)

_Function has no arguments._

## restart_thrift_metastore()
## is_hs2_configured()

Function to restart thrift metastore server
Function to check if HiveServer2 is configured

### Example

```bash
restart_thrift_metastore
if [[ is_hs2_configured ]]; then
# do something here
fi
```

_Function has no arguments._

# hive/glue-sync.sh

Provides function to install Hive Glue Catalog Sync Agent

* [install_glue_sync()](#installgluesync)
### Exit codes

* **0**: If HiveServer2 is configured
* **1**: Otherwise

## install_glue_sync()
## stop_hs2()

Installs Hive Glue Catalog Sync Agent
Function to stop HiveServer2 JVM

Requires Hive 2.x
Currently supported only on AWS
Works on both Hadoop2 and HiveServer2 clusters

### Example

```bash
install_glue_sync us-east-1
stop_hs2
```

### Arguments
_Function has no arguments._

* **$1** (string): Region for AWS Athena. Defaults to `us-east-1`
## start_hs2()

# hive/ranger-client.sh
Function to start HiveServer2 JVM

Provides function to install Apache Ranger client for Hive
Works on both Hadoop2 and HiveServer2 clusters

* [install_ranger()](#installranger)
### Example

```bash
start_hs2
```

## install_ranger()
_Function has no arguments._

Install Apache Ranger client for Hive
## restart_hs2()

Currently supported only on AWS
Requires HiveServer2
Function to restart HiveServer2 JVM

Works on both Hadoop2 and HiveServer2 clusters

### Example

```bash
install_ranger -h example.host -p 6080 -r examplerepo
restart_hs2
```

### Arguments

* -h string Hostname of Ranger admin. Defaults to `localhost`
* -p int Port where Ranger admin is running. Defaults to `6080`
* -r string Name of Ranger repository. Defaults to `hivedev`
_Function has no arguments._

Loading

0 comments on commit d30caf4

Please sign in to comment.