Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart docker-compose #220

Open
ohdearaugustin opened this issue Aug 7, 2024 · 0 comments
Open

Restart docker-compose #220

ohdearaugustin opened this issue Aug 7, 2024 · 0 comments

Comments

@ohdearaugustin
Copy link

The docker-compose setup only start more or less once. If you try to restart it the hbase won't find it's regionserver again.

This is probably causes by the distributed setup of hbase.

A whole zookeeper cluster only for a single node hbase, that won't restart I think is a bit a overkill just for a "example" setup.
I think it would be more useful for more people to have a really simple setup with the builtin zookeeper of hbase. You can achieve that by:

  1. Removing all depend to zoo1

  2. Add zookeeper port to hbase

    expose:
        - "2181"
    ports:
        - "2181:2181"
    
  3. Overwrite hbase-site.xml with:

    <configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>file:///home/pinpoint/hbase</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/home/pinpoint/zookeeper</value>
    </property>
    <property>
        <name>hbase.master.port</name>
        <value>60000</value>
    </property>
    <property>
        <name>hbase.regionserver.port</name>
        <value>60020</value>
    </property>
    </configuration>
    

    Therefore you just mount the new hbase-site.xml over the old one. Also mount the zookeeper directory with persistance.

    volumes:
     - hbase_zookeeper:/home/pinpoint/zookeeper
     - ./hbase-site.xml:/opt/hbase/hbase-2.2.6/conf/hbase-site.xml
    
  4. In the env file replace PINPOINT_ZOOKEEPER_ADDRESS=pinpoint-hbase and FLINK_CLUSTER_ZOOKEEPER_ADDRESS=pinpoint-hbase

This setup will survive a docker-compe down and up again.

You can probably also keep the zookeeper in the setup and only remove the distributed property from hbase-site.xml

    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>

I didn't tested this setup thou. I hope this will save someone a bit of debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant