Fix misspellings.

This commit is contained in:
Andrew Raines 2013-09-11 13:49:33 -05:00
parent 7425b85b0b
commit 6c9542d967
8 changed files with 36 additions and 37 deletions

View File

@ -34,11 +34,10 @@ import org.elasticsearch.env.Environment;
import org.elasticsearch.monitor.jvm.JvmInfo;
import org.elasticsearch.node.Node;
import org.elasticsearch.node.NodeBuilder;
import org.elasticsearch.node.internal.InternalSettingsPerparer;
import org.elasticsearch.node.internal.InternalSettingsPreparer;
import java.io.File;
import java.io.FileOutputStream;
import java.io.RandomAccessFile;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
@ -102,7 +101,7 @@ public class Bootstrap {
}
private static Tuple<Settings, Environment> initialSettings() {
return InternalSettingsPerparer.prepareSettings(EMPTY_SETTINGS, true);
return InternalSettingsPreparer.prepareSettings(EMPTY_SETTINGS, true);
}
/**

View File

@ -72,7 +72,7 @@ import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.EnvironmentModule;
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.PluginsService;
import org.elasticsearch.search.TransportSearchModule;
@ -155,7 +155,7 @@ public class TransportClient extends AbstractClient {
* @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())
.put("network.server", false)
.put("node.client", true)

View File

@ -116,7 +116,7 @@ public final class InternalNode implements Node {
}
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;

View File

@ -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) {
// ignore this prefixes when getting properties from es. and elasticsearch.

View File

@ -26,7 +26,7 @@ import org.elasticsearch.common.io.FileSystemUtils;
import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.settings.Settings;
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.SSLContext;
@ -289,7 +289,7 @@ public class PluginManager {
private static final int EXIT_CODE_ERROR = 70;
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()) {
FileSystemUtils.mkdirs(initialSettings.v2().pluginsFile());

View File

@ -35,7 +35,7 @@ import java.util.Map.Entry;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
public class DuellFieldDataTests extends AbstractFieldDataTests {
public class DuelFieldDataTests extends AbstractFieldDataTests {
@Override
protected FieldDataType getFieldDataType() {
@ -49,7 +49,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
}
@Test
public void testDuellAllTypesSingleValue() throws Exception {
public void testDuelAllTypesSingleValue() throws Exception {
Random random = getRandom();
int atLeast = atLeast(random, 1000);
for (int i = 0; i < atLeast; i++) {
@ -69,7 +69,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
}
}
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", "paged_bytes")), Type.Bytes);
typeMap.put(new FieldDataType("byte"), Type.Integer);
@ -95,21 +95,21 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
ifdService.clear();
IndexFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
right.getKey());
duellFieldDataBytes(random, context, leftFieldData, rightFieldData, pre);
duellFieldDataBytes(random, context, rightFieldData, leftFieldData, pre);
duelFieldDataBytes(random, context, leftFieldData, rightFieldData, pre);
duelFieldDataBytes(random, context, rightFieldData, leftFieldData, pre);
DirectoryReader perSegment = DirectoryReader.open(writer, true);
CompositeReaderContext composite = perSegment.getContext();
List<AtomicReaderContext> leaves = composite.leaves();
for (AtomicReaderContext atomicReaderContext : leaves) {
duellFieldDataBytes(random, atomicReaderContext, leftFieldData, rightFieldData, pre);
duelFieldDataBytes(random, atomicReaderContext, leftFieldData, rightFieldData, pre);
}
}
}
@Test
public void testDuellIntegers() throws Exception {
public void testDuelIntegers() throws Exception {
Random random = getRandom();
int atLeast = atLeast(random, 1000);
for (int i = 0; i < atLeast; i++) {
@ -128,7 +128,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
}
}
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("short"), Type.Integer);
typeMap.put(new FieldDataType("int"), Type.Integer);
@ -149,21 +149,21 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
ifdService.clear();
IndexNumericFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
right.getKey());
duellFieldDataLong(random, context, leftFieldData, rightFieldData);
duellFieldDataLong(random, context, rightFieldData, leftFieldData);
duelFieldDataLong(random, context, leftFieldData, rightFieldData);
duelFieldDataLong(random, context, rightFieldData, leftFieldData);
DirectoryReader perSegment = DirectoryReader.open(writer, true);
CompositeReaderContext composite = perSegment.getContext();
List<AtomicReaderContext> leaves = composite.leaves();
for (AtomicReaderContext atomicReaderContext : leaves) {
duellFieldDataLong(random, atomicReaderContext, leftFieldData, rightFieldData);
duelFieldDataLong(random, atomicReaderContext, leftFieldData, rightFieldData);
}
}
}
@Test
public void testDuellDoubles() throws Exception {
public void testDuelDoubles() throws Exception {
Random random = getRandom();
int atLeast = atLeast(random, 1000);
for (int i = 0; i < atLeast; i++) {
@ -182,7 +182,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
}
}
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("double"), Type.Double);
ArrayList<Entry<FieldDataType, Type>> list = new ArrayList<Entry<FieldDataType, Type>>(typeMap.entrySet());
@ -201,14 +201,14 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
ifdService.clear();
IndexNumericFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
right.getKey());
duellFieldDataDouble(random, context, leftFieldData, rightFieldData);
duellFieldDataDouble(random, context, rightFieldData, leftFieldData);
duelFieldDataDouble(random, context, leftFieldData, rightFieldData);
duelFieldDataDouble(random, context, rightFieldData, leftFieldData);
DirectoryReader perSegment = DirectoryReader.open(writer, true);
CompositeReaderContext composite = perSegment.getContext();
List<AtomicReaderContext> leaves = composite.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
public void testDuellStrings() throws Exception {
public void testDuelStrings() throws Exception {
Random random = getRandom();
int atLeast = atLeast(random, 1000);
for (int i = 0; i < atLeast; i++) {
@ -237,7 +237,7 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
}
}
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", "paged_bytes")), Type.Bytes);
// TODO add filters
@ -258,14 +258,14 @@ public class DuellFieldDataTests extends AbstractFieldDataTests {
ifdService.clear();
IndexFieldData rightFieldData = ifdService.getForField(new FieldMapper.Names(right.getValue().name().toLowerCase(Locale.ROOT)),
right.getKey());
duellFieldDataBytes(random, context, leftFieldData, rightFieldData, pre);
duellFieldDataBytes(random, context, rightFieldData, leftFieldData, pre);
duelFieldDataBytes(random, context, leftFieldData, rightFieldData, pre);
duelFieldDataBytes(random, context, rightFieldData, leftFieldData, pre);
DirectoryReader perSegment = DirectoryReader.open(writer, true);
CompositeReaderContext composite = perSegment.getContext();
List<AtomicReaderContext> leaves = composite.leaves();
for (AtomicReaderContext atomicReaderContext : leaves) {
duellFieldDataBytes(random, atomicReaderContext, leftFieldData, rightFieldData, pre);
duelFieldDataBytes(random, atomicReaderContext, leftFieldData, rightFieldData, pre);
}
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 rightData = random.nextBoolean() ? right.load(context) : right.loadDirect(context);
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 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 rightData = random.nextBoolean() ? right.load(context) : right.loadDirect(context);

View File

@ -43,11 +43,11 @@ public class InternalSettingsPerparerTests {
@Test
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
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
assertThat(tuple.v1().get("node.zone"), equalTo("bar"));
}

View File

@ -27,7 +27,7 @@ import org.elasticsearch.env.Environment;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.node.Node;
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.rest.RestStatus;
import org.elasticsearch.AbstractNodesTests;
@ -102,7 +102,7 @@ public class PluginManagerTests extends AbstractNodesTests {
}
private static PluginManager pluginManager(String pluginUrl) {
Tuple<Settings, Environment> initialSettings = InternalSettingsPerparer.prepareSettings(
Tuple<Settings, Environment> initialSettings = InternalSettingsPreparer.prepareSettings(
ImmutableSettings.settingsBuilder().build(), false);
if (!initialSettings.v2().pluginsFile().exists()) {
FileSystemUtils.mkdirs(initialSettings.v2().pluginsFile());