apache-ignite

Форк
0
147 строк · 6.2 Кб
1
{#
2
 Licensed to the Apache Software Foundation (ASF) under one or more
3
 contributor license agreements.  See the NOTICE file distributed with
4
 this work for additional information regarding copyright ownership.
5
 The ASF licenses this file to You under the Apache License, Version 2.0
6
 (the "License"); you may not use this file except in compliance with
7
 the License.  You may obtain a copy of the License at
8

9
    http://www.apache.org/licenses/LICENSE-2.0
10

11
 Unless required by applicable law or agreed to in writing, software
12
 distributed under the License is distributed on an "AS IS" BASIS,
13
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 See the License for the specific language governing permissions and
15
 limitations under the License.
16
#}
17

18
{% import 'communication_macro.j2' as communication %}
19
{% import 'discovery_macro.j2' as disco_utils %}
20
{% import 'cache_macro.j2' as cache_utils %}
21
{% import 'datastorage_macro.j2' as datastorage_utils %}
22
{% import 'misc_macro.j2' as misc_utils %}
23
{% import 'ssl_params_macro.j2' as ssl_params_util %}
24
{% import 'connector_configuration.j2' as connector_configuration_util %}
25
{% import 'client_connector_configuration.j2' as client_connector_configuration_util %}
26
{% import 'transaction_macro.j2' as transaction_util %}
27

28
{% macro apply(config, service) %}
29
    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
30
        <property name="workDirectory" value="{{ service.work_dir }}" />
31
        <property name="gridLogger">
32
            <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
33
                <constructor-arg type="java.lang.String" value="{{ service.config_dir }}/{{ config.log4j_config }}"/>
34
            </bean>
35
        </property>
36

37
        <property name="clientMode" value="{{ config.client_mode or False | lower }}"/>
38
        <property name="consistentId" value="{{ config.consistent_id }}"/>
39
        <property name="igniteInstanceName" value="{{ config.ignite_instance_name }}"/>
40
        <property name="failureDetectionTimeout" value="{{ config.failure_detection_timeout }}"/>
41
        <property name="systemWorkerBlockedTimeout" value="{{ config.sys_worker_blocked_timeout }}"/>
42
        <property name="peerClassLoadingEnabled" value="{{ config.peer_class_loading_enabled }}"/>
43
        <property name="authenticationEnabled" value="{{ config.auth_enabled | lower }}"/>
44
        {% if config.rebalance_thread_pool_size %}
45
            <property name="rebalanceThreadPoolSize" value="{{ config.rebalance_thread_pool_size }}"/>
46
        {% endif %}
47
        {% if config.rebalance_batch_size %}
48
            <property name="rebalanceBatchSize" value="{{ config.rebalance_batch_size }}"/>
49
        {% endif %}
50
        {% if config.rebalance_batches_prefetch_count %}
51
            <property name="rebalanceBatchesPrefetchCount" value="{{ config.rebalance_batches_prefetch_count }}"/>
52
        {% endif %}
53
        {% if config.rebalance_throttle %}
54
            <property name="rebalanceThrottle" value="{{ config.rebalance_throttle }}"/>
55
        {% endif %}
56

57
        {% if config.metrics_log_frequency %}
58
            <property name="metricsLogFrequency" value="{{ config.metrics_log_frequency }}"/>
59
        {% endif %}
60

61
        {% if config.metrics_update_frequency %}
62
            <property name="metricsUpdateFrequency" value="{{ config.metrics_update_frequency }}"/>
63
        {% endif %}
64

65
        {% if config.auto_activation_enabled %}
66
            <property name="autoActivationEnabled" value="{{ config.auto_activation_enabled }}"/>
67
        {% endif %}
68

69
        {% if config.metric_exporters | length > 0 %}
70
            <property name="metricExporterSpi">
71
                <list>
72
                {% for exporter in config.metric_exporters %}
73
                    {{ misc_utils.bean(exporter) }}
74
                {% endfor %}
75
                </list>
76
            </property>
77
        {% endif %}
78

79
        {{ misc_utils.cluster_state(config.cluster_state, config.version) }}
80

81
        {{ communication.communication_spi(config.communication_spi) }}
82

83
        {{ disco_utils.discovery_spi(config.discovery_spi) }}
84

85
        {{ datastorage_utils.data_storage(config.data_storage) }}
86

87
        {{ cache_utils.cache_configs(config.caches) }}
88

89
        {% if config.local_host %}
90
            <property name="localHost" value="{{ config.local_host }}"/>
91
        {% endif %}
92

93
        {% if config.properties %}
94
            {{ config.properties }}
95
        {% endif %}
96

97
        {% if config.ssl_params %}
98
            <property name="sslContextFactory">
99
                {{ ssl_params_util.ssl_params(config.ssl_params) }}
100
            </property>
101
        {% endif %}
102

103
        {{ connector_configuration_util.connector_configuration(config.connector_configuration) }}
104

105
        {{ client_connector_configuration_util.client_connector_configuration(config.client_connector_configuration) }}
106

107
        {{ transaction_util.transaction(config.transaction_configuration) }}
108

109
        {% if config.binary_configuration %}
110
            <property name="binaryConfiguration">
111
                <bean class="org.apache.ignite.configuration.BinaryConfiguration">
112
                    <property name="compactFooter" value="{{ config.binary_configuration.compact_footer }}"/>
113
                </bean>
114
            </property>
115
        {% endif %}
116

117
        {% if config.local_event_listeners %}
118
            <property name="localEventListeners" ref="{{ config.local_event_listeners }}"/>
119
        {% endif %}
120

121
        {% if config.include_event_types | length > 0 %}
122
            <property name="includeEventTypes" ref="eventTypes"/>
123
        {% endif %}
124

125
        {% if config.event_storage_spi %}
126
            <property name="eventStorageSpi" ref="{{ config.event_storage_spi }}"/>
127
        {% endif %}
128

129
        {% if config.sql_schemas | length > 0 %}
130
            <property name="sqlSchemas">
131
                <list>
132
                {% for schema in config.sql_schemas %}
133
                    <value>{{ schema }}</value>
134
                {% endfor %}
135
                </list>
136
            </property>
137
        {% endif %}
138

139
        {% if config.sql_configuration %}
140
            <property name="sqlConfiguration">
141
            {{ misc_utils.bean(config.sql_configuration) }}
142
            </property>
143
        {% endif %}
144

145
        {{ misc_utils.plugins(config) }}
146
    </bean>
147
{% endmacro %}
148

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.