Hi Ming,

It's been a long time since I looked at the region stuff in hedwig, but I
think it could be that you don't seem to be setting the region identifier
in hw_server.conf. You need to change "region" in hw_server to some
identifier, like reg1 and reg2 for your example.

Hope this helps,
Ivan

On Thu, Jan 8, 2015 at 4:19 AM, Ming Chen <[email protected]> wrote:

> Hi there,
>
> I am new to Hedwig, and have a question about setting up Hedwig with
> two regions. I have successfully set up two separate single-region
> instances of Hedwig. But I could not get them communicate with each
> other.
>
> Here are my configuration:
>
> I have two physical machines (A and B), each hosting three VMs
> mimicking a cluster in a region. In each region, the three VMs run
> ZooKeeper servers, BookKeeper bookie servers, and Hedwig servers at
> the same time.
>
> For "reg1" (machine A), the three VMs's IP are:
> X.Y.Z.111
> X.Y.Z.112
> X.Y.Z.113
>
> I successfully set them up as a single-region Hedwig instance. I could
> run "bin/hedwig console", and successfully executed commands including
> "show", "sub", "pub", "pubsub",  "readtopic", "describe topic" etc.
>
> I did the same for "reg2" (machine B), where the three VMs are:
> X.Y.Z.114
> X.Y.Z.115
> X.Y.Z.116
>
> Again, "reg2" as a single-region Hedwig instance was running well.
>
> Then, I began to setup the across-region communication of the two
> Hedwig instances. I shut down the two Hedwig instances, and set the
> "regions" option in hw_server.conf of all 6 VMs to
>
> regions=X.Y.Z.111:4080 X.Y.Z.114:4080
>
> All options, other than zk_host, region, and regions, in
> hw_server.conf are left as default. After that, I restarted the two
> Hedwig instances. I logged into the console of "reg1" and published
> some test messages in a topic. But I could not observe the topic or
> messages when I logged into console of "reg2". The same is true vice
> versa.
>
> It seemed that the two regions can find each other because I observed
> that reg1 contains hub(s) from reg2, and vice versa:
>
> [hedwig: (reg1) 24] show hubs
> Available Hub Servers:
>         X.Y.Z.111:4080:9876 :     info : [hostname:
> "X.Y.Z.111:4080:9876", czxid: 12884902049], load : [numTopics: 0]
>         X.Y.Z.116:4080:9876 :     info : [hostname:
> "X.Y.Z.116:4080:9876", czxid: 12884902050], load : [numTopics: 0]
>         X.Y.Z.112:4080:9876 :     info : [hostname:
> "X.Y.Z.112:4080:9876", czxid: 12884902051], load : [numTopics: 1]
>
> [hedwig: (reg2) 8] show hubs
> Available Hub Servers:
>         X.Y.Z.116:4080:9876 :     info : [hostname:
> "X.Y.Z.116:4080:9876", czxid: 34359738415], load : [numTopics: 0]
>         X.Y.Z.114:4080:9876 :     info : [hostname:
> "X.Y.Z.114:4080:9876", czxid: 34359738416], load : [numTopics: 0]
>         X.Y.Z.112:4080:9876 :     info : [hostname:
> "X.Y.Z.112:4080:9876", czxid: 34359738417], load : [numTopics: 0]
>
> Another thing I observed is that the "sub" command sometimes hung in
> this case. But, I did not find any error message in the log file.
>
> Am I doing something wrong? Did I set the "regions" option correctly?
> Any help is
> deeply appreciated.
>
> Thanks,
> Ming
>

Reply via email to