if (nodes == null) nodes = Maps.newLinkedHashMap();
String riakName = getRiakName(member);
if (riakName == null) {
log.error("Unable to get riak name for node: {}", member.getId());
} else {
<BUG>if (!isFirstNodeSet.getAndSet(true)) {
((EntityInternal) member).setAttribute(RiakNode.RIAK_NODE_IN_CLUSTER, Boolean.TRUE);
} else {</BUG>
Optional<Entity> anyNodeInCluster = Iterables.tryFind(nodes.keySet(), new Predicate<Entity>() {
@Override

if (nodes == null) nodes = Maps.newLinkedHashMap();
String riakName = getRiakName(member);
if (riakName == null) {
log.error("Unable to get riak name for node: {}", member.getId());
} else {
if (!isFirstNodeSet.get()) {
nodes.put(member, riakName);
setAttribute(RIAK_CLUSTER_NODES, nodes);
((EntityInternal) member).setAttribute(RiakNode.RIAK_NODE_IN_CLUSTER, Boolean.TRUE);
isFirstNodeSet.set(true);
} else {
Optional<Entity> anyNodeInCluster = Iterables.tryFind(nodes.keySet(), new Predicate<Entity>() {
@Override
