incubator-blur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikrant Navalgund (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 13:04:42 GMT


Vikrant Navalgund commented on BLUR-277:

Hi Aaron,
I suppose I can do that. Here is my reasoning for the changes I made. Please correct me if
I am wrong.
In, we are already looping on the zk.exists("Ephemeral node")
and we caught a KeeperException for this.

With my changes:
_zookeeper.create(controllerPath, version.getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
    } catch (KeeperException.NodeExistsException e) {"Node [{0}] already registered, skipping znode creation for controller path",
    } catch (KeeperException e) {

I am tying the specific exception of NodeExistsException to only the persistent node, because
the above loop at line:286 would not throw a NodeExistsException, does it ?
Also, since we are doing an optimistic node creation for a persistent node, is it not better
to go ahead and create or eat the NodeExistsException instead of one query and one set in
the worst case. 

I can have each of the node creation in a try/catch block, I suppose that would be a much
cleaner code. 
Please let me know your thoughts.


> 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