[
https://issues.apache.org/jira/browse/BLUR-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793635#comment-13793635
]
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 {
LOG.info("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.
Thanks,
Aaron
> Create an API to fetch the list of total Controller Servers in the Controller
> Cluster.
> --------------------------------------------------------------------------------------
>
> Key: BLUR-277
> URL: https://issues.apache.org/jira/browse/BLUR-277
> 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
(v6.1#6144)