You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on getting hbase-docker to run on both Windows 10 and CentOS 7 and I think I have it working on both.
On Windows, I wasn't able to connect by editing the hosts file. I don't know if Windows / Docker for Windows likes mapping an IP address of a Docker container to a hostname.
What I was able to get working came from the following .batch file
@echooffsetdata_dir=%cd%\data
rd /s /q "%data_dir%"mkdir"%data_dir%"REM Replace slashes so path is usable by Docker volume mount https://stackoverflow.com/a/2905098setdata_dir=%data_dir:\=/%
docker run -p 8080:8080 -p 8085:8085 -p 9090:9090 -p 9095:9095 -p 2181:2181 -p 16010:16010 --name=hbase-docker -h hbase-docker -d -v "%data_dir%":/data dajobe/hbase
A couple of notes:
I got a variety of errors initially related to the .sh files which I think came from git clone converting the line endings on the file to Windows style. Converting the endings back to Unix style resolved those errors
I was also getting some errors about Failed to fetch during the Docker build process that turned out to be related to corporate proxy. I added ENV https_proxy=my.proxy.com:8080 for http and https to resolve those errors
I had to expose the ports via the -p switch of docker run
I've tested invoking the REST API via CURL on my machine and getting the version number so far and it's working.
I'm also able to hit all of the management URLs in the browser with either http://localhost:8085/rest.jsp or http://127.0.0.1:8085/rest.jsp
For the CentOS 7 machine, I modified the existing start-hbase.sh file to be similar to the above batch.
#!/bin/bash## Script to start docker and update the /etc/hosts file to point to# the hbase-docker container## hbase thrift and master server logs are written to the local# logs directory#echo"Starting HBase container"
data_dir=$PWD/data
rm -rf $data_dir
mkdir -p $data_dir
id=$(docker run -p 8080:8080 -p 8085:8085 -p 9090:9090 -p 9095:9095 -p 2181:2181 -p 16010:16010 --name=hbase-docker -h hbase-docker -d -v $data_dir:/data dajobe/hbase)
The test_hbase.py script (using Thrift) seemed to run fine when I ran that locally ... just changed host value to HOST='localhost'
Also, I could access the HBase REST API running in a container on the CentOS machine from my Windows machine via curl using the CentOS machine's hostname.
Is the Note section in the README still valid? Or is there some functionality that's not here that I just haven't found yet.
Also, I can raise a pull request with the .bat file and some notes in the README about Windows support.
The text was updated successfully, but these errors were encountered:
I've been working on getting hbase-docker to run on both Windows 10 and CentOS 7 and I think I have it working on both.
On Windows, I wasn't able to connect by editing the hosts file. I don't know if Windows / Docker for Windows likes mapping an IP address of a Docker container to a hostname.
What I was able to get working came from the following .batch file
A couple of notes:
git clone
converting the line endings on the file to Windows style. Converting the endings back to Unix style resolved those errorsFailed to fetch
during the Docker build process that turned out to be related to corporate proxy. I addedENV https_proxy=my.proxy.com:8080
for http and https to resolve those errors-p
switch ofdocker run
I've tested invoking the REST API via CURL on my machine and getting the version number so far and it's working.
I'm also able to hit all of the management URLs in the browser with either http://localhost:8085/rest.jsp or http://127.0.0.1:8085/rest.jsp
For the CentOS 7 machine, I modified the existing
start-hbase.sh
file to be similar to the above batch.The
test_hbase.py
script (using Thrift) seemed to run fine when I ran that locally ... just changed host value toHOST='localhost'
Also, I could access the HBase REST API running in a container on the CentOS machine from my Windows machine via curl using the CentOS machine's hostname.
Is the Note section in the README still valid? Or is there some functionality that's not here that I just haven't found yet.
Also, I can raise a pull request with the .bat file and some notes in the README about Windows support.
The text was updated successfully, but these errors were encountered: