Skip to content

Commit

Permalink
use each with index
Browse files Browse the repository at this point in the history
  • Loading branch information
deric committed Apr 8, 2015
1 parent 8695116 commit fa39332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/conf/zoo.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ clientPortAddress=<%= @client_ip %>
#server.2=zookeeper2:2888:3888
#server.3=zookeeper3:2888:3888
<% i = 1 -%>
<% @servers.each do |h| -%>
<%= "server.#{i}=#{h}:%s:%s" % [ @election_port, @leader_port ] %><% i += 1 %>
<% @servers.each_with_index do |h, i| -%>
<%= "server.#{i+1}=#{h}:%s:%s" % [ @election_port, @leader_port ] %>
<% end -%>

# To avoid seeks ZooKeeper allocates space in the transaction log file in
Expand Down

0 comments on commit fa39332

Please sign in to comment.