?????????????clustermap???????????????clustermap????????????????????£?


1.<?xml version="1.0"?>

2.<clustermap>

3.    <!-- ????Merger??????????????????????merger???????? -->

4.    <merger_list>

5.            <merger_cluster name=m1 level=1>

6.                <merger ip=${merger["host"]} port=${merger["port"]} protocol=http/>

7.            </merger_cluster>

8.    </merger_list>

9.

10.<!-- ??????searcher????????е?????????????????? -->

11.<search_list>

12.<%

13.id = 1  # ????????searcher?е?????

14.%>

15.<!-- ?????γ??????е? -->

16.% for searcher in searchers:

17.<search_cluster name=c${id} docsep=false level=1 partition=0>

18.    <!-- ?????γ??????е? -->

19.    % for server in searcher["servers"]:

20.    <search ip=${server["host"]} port=${server["port"]} protocol=tcp type=mix />

21.    % endfor

22.</search_cluster>

23.    <%

24.    id += 1

25.    %>

26.% endfor

27.</search_list>

28.

29.    <merger_cluster_list>

30.            <merger_cluster name=m1>

31.                % for i in range(1?? id):

32.                <search_cluster name=c${i} />

33.                % endfor

34.            </merger_cluster>

35.    </merger_cluster_list>

36.</clustermap>
 


????????????1??2??????????????


1.<?xml version="1.0"?>

2.<clustermap>

3.    <merger_list>

4.            <merger_cluster name=m1 level=1>

5.                <merger ip=10.20.137.22 port=6088 protocol=http/>

6.            </merger_cluster>

7.    </merger_list>

8.

9.<search_list>

10.<search_cluster name=c1 docsep=false level=1 partition=0>

11.    <search ip=10.20.150.60 port=6322 protocol=tcp type=mix />

12.</search_cluster>

13.<search_cluster name=c1 docsep=false level=1 partition=0>

14.    <search ip=10.20.150.61 port=6322 protocol=tcp type=mix />

15.</search_cluster>

16.</search_list>

17.

18.    <merger_cluster_list>

19.            <merger_cluster name=m1>

20.                <search_cluster name=1 />

21.            </merger_cluster>

22.    </merger_cluster_list>

23.</clustermap>
 


???????

??????????????????У??????????????????o????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????