Git Product home page Git Product logo

docker-phoenix-mini's Introduction

docker-phoenix-mini

A mini Apache Phoenix cluster for local development and testing based on the official HBaseTestingUtility.

docker pull salesforce/phoenix-mini

The key configurations to make the embedded server working in docker are the following:

Default Override
hbase.zookeeper.quorum localhost HBASE_ZOOKEEPER_QUORUM
test.hbase.zookeeper.property.clientPort 2181 N/A
hbase.localcluster.assign.random.ports false N/A
hbase.master.hostname localhost HBASE_MASTER_HOSTNAME
hbase.master.ipc.address 0.0.0.0 N/A
hbase.regionserver.hostname localhost HBASE_REGIONSERVER_HOSTNAME
hbase.regionserver.ipc.address 0.0.0.0 N/A

Build

Generate the executable jar docker-phoenix-mini.jar and the docker image.

mvn package

Docker

All sql scripts copied under the directory /opt/hbase/schema will be executed. The container will report the status as healthy as soon as the server is up and running and all sql have been executed.

An example of how to run the container via docker-compose:

hbase:
    image: docker-phoenix-mini
    container_name: docker-phoenix-mini
    ports:
      - 2181:2181
      - 16000:16000
      - 16010:16010
      - 16020:16020
      - 16030:16030
      - 8080:8080
      - 8085:8085
    volumes:
      - ./hbase/schema:/opt/hbase/schema

Health check

docker-phoenix-mini has a built-in health check endpoint http://localhost:18080/health that reports 200 when the cluster is UP and running and the schema migrations executed.

The container ships with a built-in HEALTHCHECK that reports the health status back to docker:

docker inspect -f '{{.State.Health}}' docker-phoenix-mini

or

docker inspect --format='{{json .State.Health}}' docker-phoenix-mini | jq -r .Status

When the container is healthy it should output something like :

{healthy 0 [0xc0002980a0 0xc0002980f0 0xc000298140 0xc000298190 0xc0002981e0]}

Ports

Key Port Url
health check 18080 http://localhost:18080/health
hbase.zookeeper.property.clientPort 2181
hbase.master.port 16000
hbase.master.info.port 16010 http://localhost:16010/master-status
hbase.regionserver.port 16020
hbase.regionserver.info.port 16030 http://localhost:16030/rs-status
hbase.rest.port 8080
hbase.rest.info.port 8085

docker-phoenix-mini's People

Contributors

berardino avatar svc-scm 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.