Fix misspellings.
This commit is contained in:
parent
7425b85b0b
commit
6c9542d967
|
@ -34,11 +34,10 @@ import org.elasticsearch.env.Environment;
|
||||||
import org.elasticsearch.monitor.jvm.JvmInfo;
|
import org.elasticsearch.monitor.jvm.JvmInfo;
|
||||||
import org.elasticsearch.node.Node;
|
import org.elasticsearch.node.Node;
|
||||||
import org.elasticsearch.node.NodeBuilder;
|
import org.elasticsearch.node.NodeBuilder;
|
||||||
import org.elasticsearch.node.internal.InternalSettingsPerparer;
|
import org.elasticsearch.node.internal.InternalSettingsPreparer;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.RandomAccessFile;
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
@ -102,7 +101,7 @@ public class Bootstrap {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Tuple<Settings, Environment> initialSettings() {
|
private static Tuple<Settings, Environment> initialSettings() {
|
||||||
return InternalSettingsPerparer.prepareSettings(EMPTY_SETTINGS, true);
|
return InternalSettingsPreparer.prepareSettings(EMPTY_SETTINGS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -72,7 +72,7 @@ import org.elasticsearch.common.transport.TransportAddress;
|
||||||
import org.elasticsearch.env.Environment;
|
import org.elasticsearch.env.Environment;
|
||||||
import org.elasticsearch.env.EnvironmentModule;
|
import org.elasticsearch.env.EnvironmentModule;
|
||||||
import org.elasticsearch.monitor.MonitorService;
|
import org.elasticsearch.monitor.MonitorService;
|
||||||
import org.elasticsearch.node.internal.InternalSettingsPerparer;
|
import org.elasticsearch.node.internal.InternalSettingsPreparer;
|
||||||
import org.elasticsearch.plugins.PluginsModule;
|
import org.elasticsearch.plugins.PluginsModule;
|
||||||
import org.elasticsearch.plugins.PluginsService;
|
import org.elasticsearch.plugins.PluginsService;
|
||||||
import org.elasticsearch.search.TransportSearchModule;
|
import org.elasticsearch.search.TransportSearchModule;
|
||||||
|
@ -155,7 +155,7 @@ public class TransportClient extends AbstractClient {
|
||||||
* @throws ElasticSearchException
|
* @throws ElasticSearchException
|
||||||
*/
|
*/
|
||||||
public TransportClient(Settings pSettings, boolean loadConfigSettings) throws ElasticSearchException {
|
public TransportClient(Settings pSettings, boolean loadConfigSettings) throws ElasticSearchException {
|
||||||
Tuple<Settings, Environment> tuple = InternalSettingsPerparer.prepareSettings(pSettings, loadConfigSettings);
|
Tuple<Settings, Environment> tuple = InternalSettingsPreparer.prepareSettings(pSettings, loadConfigSettings);
|
||||||
Settings settings = settingsBuilder().put(tuple.v1())
|
Settings settings = settingsBuilder().put(tuple.v1())
|
||||||
.put("network.server", false)
|
.put("network.server", false)
|
||||||
.put("node.client", true)
|
.put("node.client", true)
|
||||||
|
|
|
@ -116,7 +116,7 @@ public final class InternalNode implements Node {
|
||||||
}
|
}
|
||||||
|
|
||||||
public InternalNode(Settings pSettings, boolean loadConfigSettings) throws ElasticSearchException {
|
public InternalNode(Settings pSettings, boolean loadConfigSettings) throws ElasticSearchException {
|
||||||
Tuple<Settings, Environment> tuple = InternalSettingsPerparer.prepareSettings(pSettings, loadConfigSettings);
|
Tuple<Settings, Environment> tuple = InternalSettingsPreparer.prepareSettings(pSettings, loadConfigSettings);
|
||||||
|
|
||||||
Version version = Version.CURRENT;
|
Version version = Version.CURRENT;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilde
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class InternalSettingsPerparer {
|
public class InternalSettingsPreparer {
|
||||||
|
|
||||||
public static Tuple<Settings, Environment> prepareSettings(Settings pSettings, boolean loadConfigSettings) {
|
public static Tuple<Settings, Environment> prepareSettings(Settings pSettings, boolean loadConfigSettings) {
|
||||||
// ignore this prefixes when getting properties from es. and elasticsearch.
|
// ignore this prefixes when getting properties from es. and elasticsearch.
|
|
@ -26,7 +26,7 @@ import org.elasticsearch.common.io.FileSystemUtils;
|
||||||
import org.elasticsearch.common.io.Streams;
|
import org.elasticsearch.common.io.Streams;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.env.Environment;
|
import org.elasticsearch.env.Environment;
|
||||||
import org.elasticsearch.node.internal.InternalSettingsPerparer;
|
import org.elasticsearch.node.internal.InternalSettingsPreparer;
|
||||||
|
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
@ -289,7 +289,7 @@ public class PluginManager {
|
||||||
private static final int EXIT_CODE_ERROR = 70;
|
private static final int EXIT_CODE_ERROR = 70;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Tuple<Settings, Environment> initialSettings = InternalSettingsPerparer.prepareSettings(EMPTY_SETTINGS, true);
|
Tuple<Settings, Environment> initialSettings = InternalSettingsPreparer.prepareSettings(EMPTY_SETTINGS, true);
|
||||||
|
|
||||||
if (!initialSettings.v2().pluginsFile().exists()) {
|
if (!initialSettings.v2().pluginsFile().exists()) {
|
||||||
FileSystemUtils.mkdirs(initialSettings.v2().pluginsFile());
|
FileSystemUtils.mkdirs(initialSettings.v2().pluginsFile());
|
||||||
|
|
|
@ -35,7 +35,7 @@ import java.util.Map.Entry;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.hamcrest.Matchers.nullValue;
|
import static org.hamcrest.Matchers.nullValue;
|
||||||
|
|
||||||
public class DuellFieldDataTests extends AbstractFieldDataTests {
|
public class DuelFieldDataTests extends AbstractFieldDataTests {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected FieldDataType getFieldDataType() {
|
protected FieldDataType getFieldDataType() {
|
||||||
|
@ -49,7 +49,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDuellAllTypesSingleValue() throws Exception {
|
public void testDuelAllTypesSingleValue() throws Exception {
|
||||||
Random random = getRandom();
|
Random random = getRandom();
|
||||||
int atLeast = atLeast(random, 1000);
|
int atLeast = atLeast(random, 1000);
|
||||||
for (int i = 0; i < atLeast; i++) {
|
for (int i = 0; i < atLeast; i++) {
|
||||||
|
@ -69,7 +69,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AtomicReaderContext context = refreshReader();
|
AtomicReaderContext context = refreshReader();
|
||||||
Map<FieldDataType, Type> typeMap = new HashMap<FieldDataType, DuellFieldDataTests.Type>();
|
Map<FieldDataType, Type> typeMap = new HashMap<FieldDataType, DuelFieldDataTests.Type>();
|
||||||
typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "fst")), Type.Bytes);
|
typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "fst")), Type.Bytes);
|
||||||
typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "paged_bytes")), Type.Bytes);
|
typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "paged_bytes")), Type.Bytes);
|
||||||
typeMap.put(new FieldDataType("byte"), Type.Integer);
|
typeMap.put(new FieldDataType("byte"), Type.Integer);
|
||||||
|
@ -95,21 +95,21 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
ifdService.clear();
|
ifdService.clear();
|
||||||
IndexFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
|
IndexFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
|
||||||
right.getKey());
|
right.getKey());
|
||||||
duellFieldDataBytes(random, context, leftFieldData, rightFieldData, pre);
|
duelFieldDataBytes(random, context, leftFieldData, rightFieldData, pre);
|
||||||
duellFieldDataBytes(random, context, rightFieldData, leftFieldData, pre);
|
duelFieldDataBytes(random, context, rightFieldData, leftFieldData, pre);
|
||||||
|
|
||||||
DirectoryReader perSegment = DirectoryReader.open(writer, true);
|
DirectoryReader perSegment = DirectoryReader.open(writer, true);
|
||||||
CompositeReaderContext composite = perSegment.getContext();
|
CompositeReaderContext composite = perSegment.getContext();
|
||||||
List<AtomicReaderContext> leaves = composite.leaves();
|
List<AtomicReaderContext> leaves = composite.leaves();
|
||||||
for (AtomicReaderContext atomicReaderContext : leaves) {
|
for (AtomicReaderContext atomicReaderContext : leaves) {
|
||||||
duellFieldDataBytes(random, atomicReaderContext, leftFieldData, rightFieldData, pre);
|
duelFieldDataBytes(random, atomicReaderContext, leftFieldData, rightFieldData, pre);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDuellIntegers() throws Exception {
|
public void testDuelIntegers() throws Exception {
|
||||||
Random random = getRandom();
|
Random random = getRandom();
|
||||||
int atLeast = atLeast(random, 1000);
|
int atLeast = atLeast(random, 1000);
|
||||||
for (int i = 0; i < atLeast; i++) {
|
for (int i = 0; i < atLeast; i++) {
|
||||||
|
@ -128,7 +128,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AtomicReaderContext context = refreshReader();
|
AtomicReaderContext context = refreshReader();
|
||||||
Map<FieldDataType, Type> typeMap = new HashMap<FieldDataType, DuellFieldDataTests.Type>();
|
Map<FieldDataType, Type> typeMap = new HashMap<FieldDataType, DuelFieldDataTests.Type>();
|
||||||
typeMap.put(new FieldDataType("byte"), Type.Integer);
|
typeMap.put(new FieldDataType("byte"), Type.Integer);
|
||||||
typeMap.put(new FieldDataType("short"), Type.Integer);
|
typeMap.put(new FieldDataType("short"), Type.Integer);
|
||||||
typeMap.put(new FieldDataType("int"), Type.Integer);
|
typeMap.put(new FieldDataType("int"), Type.Integer);
|
||||||
|
@ -149,21 +149,21 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
ifdService.clear();
|
ifdService.clear();
|
||||||
IndexNumericFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
|
IndexNumericFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
|
||||||
right.getKey());
|
right.getKey());
|
||||||
duellFieldDataLong(random, context, leftFieldData, rightFieldData);
|
duelFieldDataLong(random, context, leftFieldData, rightFieldData);
|
||||||
duellFieldDataLong(random, context, rightFieldData, leftFieldData);
|
duelFieldDataLong(random, context, rightFieldData, leftFieldData);
|
||||||
|
|
||||||
DirectoryReader perSegment = DirectoryReader.open(writer, true);
|
DirectoryReader perSegment = DirectoryReader.open(writer, true);
|
||||||
CompositeReaderContext composite = perSegment.getContext();
|
CompositeReaderContext composite = perSegment.getContext();
|
||||||
List<AtomicReaderContext> leaves = composite.leaves();
|
List<AtomicReaderContext> leaves = composite.leaves();
|
||||||
for (AtomicReaderContext atomicReaderContext : leaves) {
|
for (AtomicReaderContext atomicReaderContext : leaves) {
|
||||||
duellFieldDataLong(random, atomicReaderContext, leftFieldData, rightFieldData);
|
duelFieldDataLong(random, atomicReaderContext, leftFieldData, rightFieldData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDuellDoubles() throws Exception {
|
public void testDuelDoubles() throws Exception {
|
||||||
Random random = getRandom();
|
Random random = getRandom();
|
||||||
int atLeast = atLeast(random, 1000);
|
int atLeast = atLeast(random, 1000);
|
||||||
for (int i = 0; i < atLeast; i++) {
|
for (int i = 0; i < atLeast; i++) {
|
||||||
|
@ -182,7 +182,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AtomicReaderContext context = refreshReader();
|
AtomicReaderContext context = refreshReader();
|
||||||
Map<FieldDataType, Type> typeMap = new HashMap<FieldDataType, DuellFieldDataTests.Type>();
|
Map<FieldDataType, Type> typeMap = new HashMap<FieldDataType, DuelFieldDataTests.Type>();
|
||||||
typeMap.put(new FieldDataType("float"), Type.Float);
|
typeMap.put(new FieldDataType("float"), Type.Float);
|
||||||
typeMap.put(new FieldDataType("double"), Type.Double);
|
typeMap.put(new FieldDataType("double"), Type.Double);
|
||||||
ArrayList<Entry<FieldDataType, Type>> list = new ArrayList<Entry<FieldDataType, Type>>(typeMap.entrySet());
|
ArrayList<Entry<FieldDataType, Type>> list = new ArrayList<Entry<FieldDataType, Type>>(typeMap.entrySet());
|
||||||
|
@ -201,14 +201,14 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
ifdService.clear();
|
ifdService.clear();
|
||||||
IndexNumericFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
|
IndexNumericFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
|
||||||
right.getKey());
|
right.getKey());
|
||||||
duellFieldDataDouble(random, context, leftFieldData, rightFieldData);
|
duelFieldDataDouble(random, context, leftFieldData, rightFieldData);
|
||||||
duellFieldDataDouble(random, context, rightFieldData, leftFieldData);
|
duelFieldDataDouble(random, context, rightFieldData, leftFieldData);
|
||||||
|
|
||||||
DirectoryReader perSegment = DirectoryReader.open(writer, true);
|
DirectoryReader perSegment = DirectoryReader.open(writer, true);
|
||||||
CompositeReaderContext composite = perSegment.getContext();
|
CompositeReaderContext composite = perSegment.getContext();
|
||||||
List<AtomicReaderContext> leaves = composite.leaves();
|
List<AtomicReaderContext> leaves = composite.leaves();
|
||||||
for (AtomicReaderContext atomicReaderContext : leaves) {
|
for (AtomicReaderContext atomicReaderContext : leaves) {
|
||||||
duellFieldDataDouble(random, atomicReaderContext, leftFieldData, rightFieldData);
|
duelFieldDataDouble(random, atomicReaderContext, leftFieldData, rightFieldData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDuellStrings() throws Exception {
|
public void testDuelStrings() throws Exception {
|
||||||
Random random = getRandom();
|
Random random = getRandom();
|
||||||
int atLeast = atLeast(random, 1000);
|
int atLeast = atLeast(random, 1000);
|
||||||
for (int i = 0; i < atLeast; i++) {
|
for (int i = 0; i < atLeast; i++) {
|
||||||
|
@ -237,7 +237,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AtomicReaderContext context = refreshReader();
|
AtomicReaderContext context = refreshReader();
|
||||||
Map<FieldDataType, Type> typeMap = new HashMap<FieldDataType, DuellFieldDataTests.Type>();
|
Map<FieldDataType, Type> typeMap = new HashMap<FieldDataType, DuelFieldDataTests.Type>();
|
||||||
typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "fst")), Type.Bytes);
|
typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "fst")), Type.Bytes);
|
||||||
typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "paged_bytes")), Type.Bytes);
|
typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "paged_bytes")), Type.Bytes);
|
||||||
// TODO add filters
|
// TODO add filters
|
||||||
|
@ -258,14 +258,14 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
ifdService.clear();
|
ifdService.clear();
|
||||||
IndexFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
|
IndexFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
|
||||||
right.getKey());
|
right.getKey());
|
||||||
duellFieldDataBytes(random, context, leftFieldData, rightFieldData, pre);
|
duelFieldDataBytes(random, context, leftFieldData, rightFieldData, pre);
|
||||||
duellFieldDataBytes(random, context, rightFieldData, leftFieldData, pre);
|
duelFieldDataBytes(random, context, rightFieldData, leftFieldData, pre);
|
||||||
|
|
||||||
DirectoryReader perSegment = DirectoryReader.open(writer, true);
|
DirectoryReader perSegment = DirectoryReader.open(writer, true);
|
||||||
CompositeReaderContext composite = perSegment.getContext();
|
CompositeReaderContext composite = perSegment.getContext();
|
||||||
List<AtomicReaderContext> leaves = composite.leaves();
|
List<AtomicReaderContext> leaves = composite.leaves();
|
||||||
for (AtomicReaderContext atomicReaderContext : leaves) {
|
for (AtomicReaderContext atomicReaderContext : leaves) {
|
||||||
duellFieldDataBytes(random, atomicReaderContext, leftFieldData, rightFieldData, pre);
|
duelFieldDataBytes(random, atomicReaderContext, leftFieldData, rightFieldData, pre);
|
||||||
}
|
}
|
||||||
perSegment.close();
|
perSegment.close();
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void duellFieldDataBytes(Random random, AtomicReaderContext context, IndexFieldData left, IndexFieldData right, Preprocessor pre) throws Exception {
|
private static void duelFieldDataBytes(Random random, AtomicReaderContext context, IndexFieldData left, IndexFieldData right, Preprocessor pre) throws Exception {
|
||||||
AtomicFieldData leftData = random.nextBoolean() ? left.load(context) : left.loadDirect(context);
|
AtomicFieldData leftData = random.nextBoolean() ? left.load(context) : left.loadDirect(context);
|
||||||
AtomicFieldData rightData = random.nextBoolean() ? right.load(context) : right.loadDirect(context);
|
AtomicFieldData rightData = random.nextBoolean() ? right.load(context) : right.loadDirect(context);
|
||||||
assertThat(leftData.isMultiValued(), equalTo(rightData.isMultiValued()));
|
assertThat(leftData.isMultiValued(), equalTo(rightData.isMultiValued()));
|
||||||
|
@ -329,7 +329,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void duellFieldDataDouble(Random random, AtomicReaderContext context, IndexNumericFieldData left, IndexNumericFieldData right) throws Exception {
|
private static void duelFieldDataDouble(Random random, AtomicReaderContext context, IndexNumericFieldData left, IndexNumericFieldData right) throws Exception {
|
||||||
AtomicNumericFieldData leftData = random.nextBoolean() ? left.load(context) : left.loadDirect(context);
|
AtomicNumericFieldData leftData = random.nextBoolean() ? left.load(context) : left.loadDirect(context);
|
||||||
AtomicNumericFieldData rightData = random.nextBoolean() ? right.load(context) : right.loadDirect(context);
|
AtomicNumericFieldData rightData = random.nextBoolean() ? right.load(context) : right.loadDirect(context);
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void duellFieldDataLong(Random random, AtomicReaderContext context, IndexNumericFieldData left, IndexNumericFieldData right) throws Exception {
|
private static void duelFieldDataLong(Random random, AtomicReaderContext context, IndexNumericFieldData left, IndexNumericFieldData right) throws Exception {
|
||||||
AtomicNumericFieldData leftData = random.nextBoolean() ? left.load(context) : left.loadDirect(context);
|
AtomicNumericFieldData leftData = random.nextBoolean() ? left.load(context) : left.loadDirect(context);
|
||||||
AtomicNumericFieldData rightData = random.nextBoolean() ? right.load(context) : right.loadDirect(context);
|
AtomicNumericFieldData rightData = random.nextBoolean() ? right.load(context) : right.loadDirect(context);
|
||||||
|
|
|
@ -43,11 +43,11 @@ public class InternalSettingsPerparerTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIgnoreSystemProperties() {
|
public void testIgnoreSystemProperties() {
|
||||||
Tuple<Settings, Environment> tuple = InternalSettingsPerparer.prepareSettings(settingsBuilder().put("node.zone", "bar").build(), true);
|
Tuple<Settings, Environment> tuple = InternalSettingsPreparer.prepareSettings(settingsBuilder().put("node.zone", "bar").build(), true);
|
||||||
// Should use setting from the system property
|
// Should use setting from the system property
|
||||||
assertThat(tuple.v1().get("node.zone"), equalTo("foo"));
|
assertThat(tuple.v1().get("node.zone"), equalTo("foo"));
|
||||||
|
|
||||||
tuple = InternalSettingsPerparer.prepareSettings(settingsBuilder().put("config.ignore_system_properties", true).put("node.zone", "bar").build(), true);
|
tuple = InternalSettingsPreparer.prepareSettings(settingsBuilder().put("config.ignore_system_properties", true).put("node.zone", "bar").build(), true);
|
||||||
// Should use setting from the system property
|
// Should use setting from the system property
|
||||||
assertThat(tuple.v1().get("node.zone"), equalTo("bar"));
|
assertThat(tuple.v1().get("node.zone"), equalTo("bar"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.elasticsearch.env.Environment;
|
||||||
import org.elasticsearch.http.HttpServerTransport;
|
import org.elasticsearch.http.HttpServerTransport;
|
||||||
import org.elasticsearch.node.Node;
|
import org.elasticsearch.node.Node;
|
||||||
import org.elasticsearch.node.internal.InternalNode;
|
import org.elasticsearch.node.internal.InternalNode;
|
||||||
import org.elasticsearch.node.internal.InternalSettingsPerparer;
|
import org.elasticsearch.node.internal.InternalSettingsPreparer;
|
||||||
import org.elasticsearch.plugins.PluginManager;
|
import org.elasticsearch.plugins.PluginManager;
|
||||||
import org.elasticsearch.rest.RestStatus;
|
import org.elasticsearch.rest.RestStatus;
|
||||||
import org.elasticsearch.AbstractNodesTests;
|
import org.elasticsearch.AbstractNodesTests;
|
||||||
|
@ -102,7 +102,7 @@ public class PluginManagerTests extends AbstractNodesTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static PluginManager pluginManager(String pluginUrl) {
|
private static PluginManager pluginManager(String pluginUrl) {
|
||||||
Tuple<Settings, Environment> initialSettings = InternalSettingsPerparer.prepareSettings(
|
Tuple<Settings, Environment> initialSettings = InternalSettingsPreparer.prepareSettings(
|
||||||
ImmutableSettings.settingsBuilder().build(), false);
|
ImmutableSettings.settingsBuilder().build(), false);
|
||||||
if (!initialSettings.v2().pluginsFile().exists()) {
|
if (!initialSettings.v2().pluginsFile().exists()) {
|
||||||
FileSystemUtils.mkdirs(initialSettings.v2().pluginsFile());
|
FileSystemUtils.mkdirs(initialSettings.v2().pluginsFile());
|
||||||
|
|
Loading…
Reference in New Issue