Giter Club home page Giter Club logo

hive-metastore-docker's Introduction

Docker file for Hive Metastore 3 standalone(without hdfs service)

About

Example of running standalone Hive Metastore.

It contains following containers:

  • mariadb as dependency
  • hive metastore 3.1.2

Docker Image Usage

docker pull hhlai1990/hive-standalone-metastore:latest

docker-compose.yml

version: "2"

services:
  hive-metastore-database:
    image: mariadb:latest
    ports:
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD: admin
      MYSQL_USER: admin
      MYSQL_PASSWORD: admin
      MYSQL_DATABASE: metastore_db  
   
  hive-standalone-metastore:
    image: hhlai1990/hive-standalone-metastore:latest
    ports:
      - 9083:9083
    volumes:
      - /tmp/hive:/tmp/hive      
    depends_on:
      - hive-metastore-database   
    command: ["/wait-for-it.sh", "hive-metastore-database:3306", "--", "/entrypoint.sh"]
  

Spark

For spark use:

val spark = SparkSession
      .builder()
      .appName("SparkHiveTest")
      .config("hive.metastore.uris", "thrift://localhost:9083")
      .config("spark.sql.warehouse.dir", "/tmp/hive/warehouse")
      .enableHiveSupport()
      .getOrCreate()

Build and run

use docker compose to build && start hive

$ docker-compose build
$ docker-compose up -d

Some useful Docker commmands

clean unused images after docker building.

docker rmi -f $(docker images -f "dangling=true" -q)

enter shell to this container

docker exec -it  hive-metastore-docker_hive-metastore_1 /bin/bash

hive-metastore-docker's People

Contributors

laizhou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.