Absorb ImmutableSettings into Settings
This commit is contained in:
parent
ee179af1b8
commit
5af8412fc9
|
@ -21,7 +21,7 @@ package org.elasticsearch.script.javascript;
|
|||
|
||||
import org.elasticsearch.common.collect.Lists;
|
||||
import org.elasticsearch.common.collect.MapBuilder;
|
||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.script.ExecutableScript;
|
||||
import org.elasticsearch.test.ElasticsearchTestCase;
|
||||
import org.junit.After;
|
||||
|
@ -44,7 +44,7 @@ public class JavaScriptScriptEngineTests extends ElasticsearchTestCase {
|
|||
|
||||
@Before
|
||||
public void setup() {
|
||||
se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
|
||||
se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
|
||||
}
|
||||
|
||||
@After
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
package org.elasticsearch.script.javascript;
|
||||
|
||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.script.ExecutableScript;
|
||||
import org.elasticsearch.test.ElasticsearchTestCase;
|
||||
import org.junit.Test;
|
||||
|
@ -40,7 +40,7 @@ public class JavaScriptScriptMultiThreadedTest extends ElasticsearchTestCase {
|
|||
|
||||
@Test
|
||||
public void testExecutableNoRuntimeParams() throws Exception {
|
||||
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
|
||||
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
|
||||
final Object compiled = se.compile("x + y");
|
||||
final AtomicBoolean failed = new AtomicBoolean();
|
||||
|
||||
|
@ -84,7 +84,7 @@ public class JavaScriptScriptMultiThreadedTest extends ElasticsearchTestCase {
|
|||
|
||||
@Test
|
||||
public void testExecutableWithRuntimeParams() throws Exception {
|
||||
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
|
||||
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
|
||||
final Object compiled = se.compile("x + y");
|
||||
final AtomicBoolean failed = new AtomicBoolean();
|
||||
|
||||
|
@ -127,7 +127,7 @@ public class JavaScriptScriptMultiThreadedTest extends ElasticsearchTestCase {
|
|||
|
||||
@Test
|
||||
public void testExecute() throws Exception {
|
||||
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
|
||||
final JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
|
||||
final Object compiled = se.compile("x + y");
|
||||
final AtomicBoolean failed = new AtomicBoolean();
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.elasticsearch.script.javascript;
|
|||
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders;
|
||||
import org.elasticsearch.plugins.PluginsService;
|
||||
|
@ -54,7 +53,7 @@ public class JavaScriptScriptSearchTests extends ElasticsearchIntegrationTest {
|
|||
|
||||
@Override
|
||||
protected Settings nodeSettings(int nodeOrdinal) {
|
||||
return ImmutableSettings.builder()
|
||||
return Settings.builder()
|
||||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put("plugins." + PluginsService.LOAD_PLUGIN_FROM_CLASSPATH, true)
|
||||
.build();
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
package org.elasticsearch.script.javascript;
|
||||
|
||||
import org.elasticsearch.common.StopWatch;
|
||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.script.ExecutableScript;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -32,7 +32,7 @@ import java.util.Map;
|
|||
public class SimpleBench {
|
||||
|
||||
public static void main(String[] args) {
|
||||
JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS);
|
||||
JavaScriptScriptEngineService se = new JavaScriptScriptEngineService(Settings.Builder.EMPTY_SETTINGS);
|
||||
Object compiled = se.compile("x + y");
|
||||
|
||||
Map<String, Object> vars = new HashMap<String, Object>();
|
||||
|
|
Loading…
Reference in New Issue