Includes a fix of the
java.net.UnknownHostException
containerId
error when a client connecting to Zookeeper.
- Git;
- Docker;
- Docker Compose — included as part of the Docker Desktop for Windows and Mac, for GNU/Linux install using
pip3
.
git clone https://github.com/mrauhu/apache-hbase-phoenix
cd apache-hbase-phoenix
Run as Administrator in Command Prompt:
echo 127.0.0.1 hbase >> %WINDIR%\System32\drivers\etc\hosts
On GNU/Linux and macOS the fix applying automatically.
-
Run containers in background:
docker-compose up -d
-
Connect using JDBC URI:
127.0.0.1:2181
Example of connect using the
sqlline.py
:docker-compose exec hbase python /opt/apache-phoenix-5.0.0-HBase-2.0-bin/sqlline.py hbase:2181:/hbase
For an exit write
!quit
then press Enter. -
Show last 10 log entries for every container and follow log output:
docker-compose logs -f --tail=10
Press Ctrl + C to exit.
-
Stop background containers:
docker-compose stop
Running containers in the foreground and follow log output:
docker-compose up
Press Ctrl + C to exit.
Stopping and removing containers (include orphaned) with networks and volumes:
docker-compose down --volumes --remove-orphans
Setup in *.env
files:
hadoop.env
;hbase-standalone.env
.