pinpoint-apm / pinpoint-docker

Official Dockerized components of the Pinpoint
http://pinpoint-apm.github.io/pinpoint/
Apache License 2.0
460 stars 227 forks source link

Restart docker-compose #220

Open ohdearaugustin opened 1 month ago

ohdearaugustin commented 1 month ago

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.