ElasticsearchConfig extends MapConfig { public int getBulkFlushMaxActions() { return getInt(CONFIG_KEY_FLUSH_MAX_ACTIONS, 1000); } ElasticsearchConfig(String name, Config config); String getHTTPURL(); AuthType getAuthType(); String getBasicAuthUser(); String getBasicAuthPassword(); int getConnectTimeoutMs(); int getReadTimeoutMs(); int getBulkFlushMaxActions(); Optional<Integer> getBulkFlushIntervalMS(); static final String CONFIG_KEY_FLUSH_MAX_ACTIONS; static final String CONFIG_KEY_FLUSH_INTERVALS_MS; static final String CONFIG_KEY_HTTP_URL; static final String CONFIG_KEY_HTTP_AUTH_TYPE; static final String CONFIG_KEY_HTTP_AUTH_BASIC_USER; static final String CONFIG_KEY_HTTP_AUTH_BASIC_PASSWORD; static final String CONFIG_KEY_HTTP_CONNECT_TIMEOUT_MS; static final String CONFIG_KEY_HTTP_READ_TIMEOUT_MS; }
@Test public void testFlushMaxActions() throws Exception { assertEquals(1000, EMPTY_CONFIG.getBulkFlushMaxActions()); ElasticsearchConfig config = configForProperty("systems.es.flush.max.actions", "500"); assertEquals(500, config.getBulkFlushMaxActions()); }