incubator-blur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron McCurry (JIRA)" <>
Subject [jira] [Commented] (BLUR-277) Create an API to fetch the list of total Controller Servers in the Controller Cluster.
Date Sun, 13 Oct 2013 12:40:42 GMT


Aaron McCurry commented on BLUR-277:

The patch looks very good, there is one thing I would like to see changed.

In the BlurControllerServer on the line 288+a couple of lines.
"+      _zookeeper.create(controllerPath, version.getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);"

Since the registering of the controller will only happen once and the normal condition is
to not create a new node (since the controller is already registered).  I think we should
do something like:

Stat stat = _zookeeper.exists(controllerPath);
if (stat == null) {
  _zookeeper.create(controllerPath, version.getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
} else {"Controller [{0}] is already registered", nodeName);

Also we should put the EPHEMERAL creation and the PERSISTENT creation in separate try/catch
blocks so we know which one may have caused the error.



> Create an API to fetch the list of total Controller Servers in the Controller Cluster.
> --------------------------------------------------------------------------------------
>                 Key: BLUR-277
>                 URL:
>             Project: Apache Blur
>          Issue Type: Sub-task
>          Components: Blur
>    Affects Versions: 0.3.0
>            Reporter: Vikrant Navalgund
>             Fix For: 0.3.0
>         Attachments: BLUR-259-Subtask_1-MASTER.patch
>   Original Estimate: 6h
>  Remaining Estimate: 6h
> Right now we have an API to fetch the list of online controller servers. The method says
getControllerServerList() which in turn gets only the online list. 
> Suppose the Blur Shell needs a list of both the online and the offline controller list
we have no way of getting it today. This API gets the total controller list and with the existing
method to get the online controller list, the clients can do a Set difference and get the
offline list.

This message was sent by Atlassian JIRA

View raw message